mirror of https://github.com/apache/lucene.git
LUCENE-10431: Remove MultiTermQuery.setRewriteMethod() (#726)
This commit is contained in:
parent
81ab1e598f
commit
e049e426dd
|
@ -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
|
||||
---------------------
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue