mirror of
https://github.com/apache/lucene.git
synced 2025-02-24 11:16:35 +00:00
SOLR-8482: add & use QueryCommand.[gs]etTerminateEarly accessors.
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1723358 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
c76b72f448
commit
21ed3b7ffa
@ -434,6 +434,8 @@ Other Changes
|
||||
* SOLR-8489: TestMiniSolrCloudCluster.createCollection to support extra & alternative collectionProperties
|
||||
(Christine Poerschke)
|
||||
|
||||
* SOLR-8482: add & use QueryCommand.[gs]etTerminateEarly accessors. (Christine Poerschke)
|
||||
|
||||
================== 5.4.0 ==================
|
||||
|
||||
Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release
|
||||
|
@ -190,7 +190,7 @@ public class SolrIndexSearcher extends IndexSearcher implements Closeable,SolrIn
|
||||
private void buildAndRunCollectorChain(QueryResult qr, Query query,
|
||||
Collector collector, QueryCommand cmd, DelegatingCollector postFilter) throws IOException {
|
||||
|
||||
final boolean terminateEarly = (cmd.getFlags() & TERMINATE_EARLY) == TERMINATE_EARLY;
|
||||
final boolean terminateEarly = cmd.getTerminateEarly();
|
||||
if (terminateEarly) {
|
||||
collector = new EarlyTerminatingCollector(collector, cmd.getLen());
|
||||
}
|
||||
@ -2556,6 +2556,11 @@ public class SolrIndexSearcher extends IndexSearcher implements Closeable,SolrIn
|
||||
public QueryCommand setNeedDocSet(boolean needDocSet) {
|
||||
return needDocSet ? setFlags(GET_DOCSET) : clearFlags(GET_DOCSET);
|
||||
}
|
||||
|
||||
public boolean getTerminateEarly() { return (flags & TERMINATE_EARLY) != 0; }
|
||||
public QueryCommand setTerminateEarly(boolean segmentTerminateEarly) {
|
||||
return segmentTerminateEarly ? setFlags(TERMINATE_EARLY) : clearFlags(TERMINATE_EARLY);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user