mirror of https://github.com/apache/lucene.git
LUCENE-8811: Undo removal of deprecations.
This commit is contained in:
parent
26ede632e6
commit
607c46c997
|
@ -22,8 +22,10 @@ API Changes
|
||||||
byte[] that stores the UTF-8 bytes of the stored string.
|
byte[] that stores the UTF-8 bytes of the stored string.
|
||||||
(Namgyu Kim via Adrien Grand)
|
(Namgyu Kim via Adrien Grand)
|
||||||
|
|
||||||
* LUCENE-8811: Deprecated BooleanQuery#setMaxClauseCount() and getMaxClauseCount
|
* LUCENE-8811: BooleanQuery#setMaxClauseCount() and #getMaxClauseCount() have
|
||||||
have been removed (Atri Sharma, Adrien Grand, Alan Woodward)
|
moved to IndexSearcher. The checks are now implemented using a QueryVisitor
|
||||||
|
and apply to all queries, rather than only booleans. (Atri Sharma, Adrien
|
||||||
|
Grand, Alan Woodward)
|
||||||
|
|
||||||
Improvements
|
Improvements
|
||||||
|
|
||||||
|
@ -60,11 +62,6 @@ API Changes
|
||||||
This change is fully backwards compatible since ExecutorService directly
|
This change is fully backwards compatible since ExecutorService directly
|
||||||
implements Executor. (Simon Willnauer)
|
implements Executor. (Simon Willnauer)
|
||||||
|
|
||||||
* LUCENE-8811: BooleanQuery#setMaxClauseCount() and #getMaxClauseCount() have
|
|
||||||
moved to IndexSearcher. The checks are now implemented using a QueryVisitor
|
|
||||||
and apply to all queries, rather than only booleans. (Atri Sharma, Adrien
|
|
||||||
Grand, Alan Woodward)
|
|
||||||
|
|
||||||
* LUCENE-8856: Intervals queries have moved from the sandbox to the queries
|
* LUCENE-8856: Intervals queries have moved from the sandbox to the queries
|
||||||
module. (Alan Woodward)
|
module. (Alan Woodward)
|
||||||
|
|
||||||
|
|
|
@ -41,6 +41,34 @@ import org.apache.lucene.search.BooleanClause.Occur;
|
||||||
*/
|
*/
|
||||||
public class BooleanQuery extends Query implements Iterable<BooleanClause> {
|
public class BooleanQuery extends Query implements Iterable<BooleanClause> {
|
||||||
|
|
||||||
|
/** Thrown when an attempt is made to add more than {@link
|
||||||
|
* #getMaxClauseCount()} clauses. This typically happens if
|
||||||
|
* a PrefixQuery, FuzzyQuery, WildcardQuery, or TermRangeQuery
|
||||||
|
* is expanded to many terms during search.
|
||||||
|
* @deprecated use {@link IndexSearcher.TooManyClauses}
|
||||||
|
*/
|
||||||
|
@Deprecated // Remove in Lucene 10
|
||||||
|
public static class TooManyClauses extends IndexSearcher.TooManyClauses { }
|
||||||
|
|
||||||
|
/** Return the maximum number of clauses permitted, 1024 by default.
|
||||||
|
* Attempts to add more than the permitted number of clauses cause {@link
|
||||||
|
* TooManyClauses} to be thrown.
|
||||||
|
* @see IndexSearcher#setMaxClauseCount(int)
|
||||||
|
* @deprecated use {@link IndexSearcher#getMaxClauseCount()}
|
||||||
|
*/
|
||||||
|
@Deprecated // Remove in Lucene 10
|
||||||
|
public static int getMaxClauseCount() { return IndexSearcher.getMaxClauseCount(); }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the maximum number of clauses permitted per BooleanQuery.
|
||||||
|
* Default value is 1024.
|
||||||
|
* @deprecated use {@link IndexSearcher#setMaxClauseCount(int)}
|
||||||
|
*/
|
||||||
|
@Deprecated // Remove in Lucene 10
|
||||||
|
public static void setMaxClauseCount(int maxClauseCount) {
|
||||||
|
IndexSearcher.setMaxClauseCount(maxClauseCount);
|
||||||
|
}
|
||||||
|
|
||||||
/** A builder for boolean queries. */
|
/** A builder for boolean queries. */
|
||||||
public static class Builder {
|
public static class Builder {
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue