/** * Set the minimum number of matching SHOULD clauses. * @see #getMinimumNumberShouldMatch * @deprecated Boolean queries should be created once with {@link Builder} * and then considered immutable. See {@link Builder#setMinimumNumberShouldMatch}. */ @Deprecated public void setMinimumNumberShouldMatch(int min) { ensureMutable("setMinimumNumberShouldMatch"); this.minimumNumberShouldMatch = min; }
/** * Set the minimum number of matching SHOULD clauses. * @see #getMinimumNumberShouldMatch * @deprecated Boolean queries should be created once with {@link Builder} * and then considered immutable. See {@link Builder#setMinimumNumberShouldMatch}. */ @Deprecated public void setMinimumNumberShouldMatch(int min) { ensureMutable("setMinimumNumberShouldMatch"); this.minimumNumberShouldMatch = min; }
/** Adds a clause to a boolean query. * @throws TooManyClauses if the new number of clauses exceeds the maximum clause number * @see #getMaxClauseCount() * @deprecated Boolean queries should be created once with {@link Builder} * and then considered immutable. See {@link Builder#add}. */ @Deprecated public void add(BooleanClause clause) { ensureMutable("add"); Objects.requireNonNull(clause, "BooleanClause must not be null"); if (clauses.size() >= maxClauseCount) { throw new TooManyClauses(); } clauses.add(clause); } }
/** Adds a clause to a boolean query. * @throws TooManyClauses if the new number of clauses exceeds the maximum clause number * @see #getMaxClauseCount() * @deprecated Boolean queries should be created once with {@link Builder} * and then considered immutable. See {@link Builder#add}. */ @Deprecated public void add(BooleanClause clause) { ensureMutable("add"); Objects.requireNonNull(clause, "BooleanClause must not be null"); if (clauses.size() >= maxClauseCount) { throw new TooManyClauses(); } clauses.add(clause); } }