mirror of
https://github.com/yacy/yacy_search_server.git
synced 2026-10-25 05:54:15 +00:00
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
This commit is contained in:
1 parent
b6a41df4f7
commit
d03e2c98ea
1 file changed
+9
-2
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user