Apache Lucene open-source search software
SOLR-3240: add "spellcheck.collateMaxCollectDocs" (removing dead code).
James Dyer67e922c39271
diff --git a/solr/core/src/java/org/apache/solr/handler/component/SpellCheckComponent.java b/solr/core/src/java/org/apache/solr/handler/component/SpellCheckComponent.javaindex 9a19522b037..dc99ba02980 100644--- a/solr/core/src/java/org/apache/solr/handler/component/SpellCheckComponent.java+++ b/solr/core/src/java/org/apache/solr/handler/component/SpellCheckComponent.java@@ -226,7 +226,7 @@ public class SpellCheckComponent extends SearchComponent implements SolrCoreAwar.setMaxCollationEvaluations(maxCollationEvaluations).setSuggestionsMayOverlap(suggestionsMayOverlap).setDocCollectionLimit(maxCollationCollectDocs)- .setReportHits(collationExtendedResults);+ ;List<SpellCheckCollation> collations = collator.collate(spellingResult, q, rb);//by sorting here we guarantee a non-distributed request returns all//results in the same order as a distributed request would,diff --git a/solr/core/src/java/org/apache/solr/search/SolrIndexSearcher.java b/solr/core/src/java/org/apache/solr/search/SolrIndexSearcher.javaindex ac25388e87c..b2537479cbc 100644--- a/solr/core/src/java/org/apache/solr/search/SolrIndexSearcher.java+++ b/solr/core/src/java/org/apache/solr/search/SolrIndexSearcher.java@@ -1237,7 +1237,6 @@ public class SolrIndexSearcher extends IndexSearcher implements Closeable,SolrInstatic final int NO_CHECK_FILTERCACHE = 0x20000000;static final int NO_SET_QCACHE = 0x10000000;public static final int TERMINATE_EARLY = 0x04;- public static final int FORCE_INORDER_COLLECTION = 0x08;public static final int GET_DOCLIST = 0x02; // get the documents actually returned in a responsepublic static final int GET_SCORES = 0x01;diff --git a/solr/core/src/java/org/apache/solr/spelling/SpellCheckCollator.java b/solr/core/src/java/org/apache/solr/spelling/SpellCheckCollator.javaindex bd324495fb5..b57552ae6d9 100644--- a/solr/core/src/java/org/apache/solr/spelling/SpellCheckCollator.java+++ b/solr/core/src/java/org/apache/solr/spelling/SpellCheckCollator.java@@ -47,7 +47,6 @@ public class SpellCheckCollator {private int maxCollationEvaluations = 10000;private boolean suggestionsMayOverlap = false;private int docCollectionLimit = 0;- private boolean reportHits = true;public List<SpellCheckCollation> collate(SpellingResult result,String originalQuery, ResponseBuilder ultimateResponse) {@@ -142,11 +141,7 @@ public class SpellCheckCollator {queryComponent.prepare(checkResponse);if (docCollectionLimit > 0) {int f = checkResponse.getFieldFlags();- checkResponse.setFieldFlags(f |= SolrIndexSearcher.TERMINATE_EARLY);- if (reportHits) {- f = checkResponse.getFieldFlags();- checkResponse.setFieldFlags(f |= SolrIndexSearcher.FORCE_INORDER_COLLECTION);- }+ checkResponse.setFieldFlags(f |= SolrIndexSearcher.TERMINATE_EARLY);}queryComponent.process(checkResponse);hits = (Integer) checkResponse.rsp.getToLog().get("hits");@@ -259,9 +254,5 @@ public class SpellCheckCollator {public SpellCheckCollator setDocCollectionLimit(int docCollectionLimit) {this.docCollectionLimit = docCollectionLimit;return this;- }- public SpellCheckCollator setReportHits(boolean reportHits) {- this.reportHits = reportHits;- return this;- }+ }}