mirror of
https://github.com/yacy/yacy_search_server.git
synced 2024-09-19 00:01:41 +02: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:
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…
Reference in New Issue
Block a user