LUCENE-10431: Remove MultiTermQuery.setRewriteMethod() (#726)

This commit is contained in:
Alan Woodward 2022-03-04 11:54:02 +00:00 committed by GitHub
parent 81ab1e598f
commit e049e426dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 12 deletions

View File

@ -20,6 +20,8 @@ API Changes
* LUCENE-10440: TaxonomyFacets and FloatTaxonomyFacets have been made pkg-private and only serve
as internal implementation details of taxonomy-faceting. (Greg Miller)
* LUCENE-10431: MultiTermQuery.setRewriteMethod() has been removed. (Alan Woodward)
New Features
---------------------

View File

@ -52,7 +52,7 @@ import org.apache.lucene.util.AttributeSource;
*/
public abstract class MultiTermQuery extends Query {
protected final String field;
protected RewriteMethod rewriteMethod; // TODO make this final
protected final RewriteMethod rewriteMethod;
/** Abstract class that defines how the query is rewritten. */
public abstract static class RewriteMethod {
@ -283,21 +283,11 @@ public abstract class MultiTermQuery extends Query {
return rewriteMethod.rewrite(reader, this);
}
/** @return the rewrite method used to build the final query */
public RewriteMethod getRewriteMethod() {
return rewriteMethod;
}
/**
* Sets the rewrite method to be used when executing the query. You can use one of the four core
* methods, or implement your own subclass of {@link RewriteMethod}.
*
* @deprecated set this using a constructor instead
*/
@Deprecated
public void setRewriteMethod(RewriteMethod method) {
rewriteMethod = method;
}
@Override
public int hashCode() {
final int prime = 31;