SOLR-3240: add "spellcheck.collateMaxCollectDocs" (removing dead code).

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1479645 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
James Dyer 2013-05-06 17:17:57 +00:00
parent 7141cb35a7
commit 67e922c392
3 changed files with 3 additions and 13 deletions

View File

@ -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,

View File

@ -1237,7 +1237,6 @@ public class SolrIndexSearcher extends IndexSearcher implements Closeable,SolrIn
static 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 response
public static final int GET_SCORES = 0x01;

View File

@ -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;
}
}
}