Fix Conjunction.addOperator to do nothing if term is empty

prevent to result in query string with repeated logical operator
like "field:term AND AND field:term"
possibliy causing out of mem in postprocessing_doublecontent
pull/149/head
reger 7 years ago
parent b6a41df4f7
commit d03e2c98ea

@ -19,10 +19,17 @@ public abstract class AbstractOperations extends AbstractTerm implements Operati
for (Term t: this.terms) h += t.hashCode();
return h;
}
/**
* Add the term with the defined logical operator.
* If length of term is empty nothing is changed
* @param term
*/
@Override
public void addOperand(Term term) {
this.terms.add(term);
if (term.toString().isEmpty()) {
this.terms.add(term);
}
}
/**

Loading…
Cancel
Save