diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txt index 7700308dcc7..3419e9d90a5 100644 --- a/lucene/CHANGES.txt +++ b/lucene/CHANGES.txt @@ -682,8 +682,7 @@ Optimizations * LUCENE-2123, LUCENE-2261: Move FuzzyQuery rewrite to separate RewriteMode into MultiTermQuery. The number of fuzzy expansions can be specified with - the maxExpansions parameter to FuzzyQuery, but the default is limited to - BooleanQuery.maxClauseCount() as before. + the maxExpansions parameter to FuzzyQuery. (Uwe Schindler, Robert Muir, Mike McCandless) * LUCENE-2164: ConcurrentMergeScheduler has more control over merge diff --git a/lucene/src/java/org/apache/lucene/search/MultiTermQuery.java b/lucene/src/java/org/apache/lucene/search/MultiTermQuery.java index 747779505e1..ac8b713a739 100644 --- a/lucene/src/java/org/apache/lucene/search/MultiTermQuery.java +++ b/lucene/src/java/org/apache/lucene/search/MultiTermQuery.java @@ -283,14 +283,6 @@ public abstract class MultiTermQuery extends Query { this.size = size; } - /** - * Create a TopTermsBooleanQueryRewrite that is limited - * to at most {@link BooleanQuery#getMaxClauseCount} terms. - */ - public TopTermsBooleanQueryRewrite() { - this(Integer.MAX_VALUE); - } - /** Return a suitable Query for a MultiTermQuery term. */ protected abstract Query getQuery(Term term, int docCount); @@ -379,14 +371,6 @@ public abstract class MultiTermQuery extends Query { public static final class TopTermsScoringBooleanQueryRewrite extends TopTermsBooleanQueryRewrite { - /** - * Create a TopTermsScoringBooleanQueryRewrite that is limited - * to at most {@link BooleanQuery#getMaxClauseCount} terms. - */ - public TopTermsScoringBooleanQueryRewrite() { - super(); - } - /** * Create a TopTermsScoringBooleanQueryRewrite for * at most size terms. @@ -417,14 +401,6 @@ public abstract class MultiTermQuery extends Query { public static final class TopTermsBoostOnlyBooleanQueryRewrite extends TopTermsBooleanQueryRewrite { - /** - * Create a TopTermsBoostOnlyBooleanQueryRewrite that is limited - * to at most {@link BooleanQuery#getMaxClauseCount} terms. - */ - public TopTermsBoostOnlyBooleanQueryRewrite() { - super(); - } - /** * Create a TopTermsBoostOnlyBooleanQueryRewrite for * at most size terms. diff --git a/lucene/src/test/org/apache/lucene/search/TestFuzzyQuery.java b/lucene/src/test/org/apache/lucene/search/TestFuzzyQuery.java index 27180cd9238..af9083700f8 100644 --- a/lucene/src/test/org/apache/lucene/search/TestFuzzyQuery.java +++ b/lucene/src/test/org/apache/lucene/search/TestFuzzyQuery.java @@ -329,7 +329,7 @@ public class TestFuzzyQuery extends LuceneTestCase { writer.close(); FuzzyQuery query = new FuzzyQuery(new Term("field", "lucene")); - query.setRewriteMethod(new MultiTermQuery.TopTermsBoostOnlyBooleanQueryRewrite()); + query.setRewriteMethod(new MultiTermQuery.TopTermsBoostOnlyBooleanQueryRewrite(50)); ScoreDoc[] hits = searcher.search(query, null, 1000).scoreDocs; assertEquals(3, hits.length); // normally, 'Lucenne' would be the first result as IDF will skew the score. diff --git a/lucene/src/test/org/apache/lucene/search/TestTermRangeQuery.java b/lucene/src/test/org/apache/lucene/search/TestTermRangeQuery.java index d5f3bd89224..b8865510a33 100644 --- a/lucene/src/test/org/apache/lucene/search/TestTermRangeQuery.java +++ b/lucene/src/test/org/apache/lucene/search/TestTermRangeQuery.java @@ -138,7 +138,7 @@ public class TestTermRangeQuery extends LuceneTestCase { } private void checkBooleanTerms(Searcher searcher, TermRangeQuery query, String... terms) throws IOException { - query.setRewriteMethod(new MultiTermQuery.TopTermsScoringBooleanQueryRewrite()); + query.setRewriteMethod(new MultiTermQuery.TopTermsScoringBooleanQueryRewrite(50)); final BooleanQuery bq = (BooleanQuery) searcher.rewrite(query); final Set allowedTerms = new HashSet(Arrays.asList(terms)); assertEquals(allowedTerms.size(), bq.clauses().size());