mirror of https://github.com/apache/lucene.git
SOLR-5020: add DelegatingCollector.final()
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1501376 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
2734af0c56
commit
fd914505ea
|
@ -75,5 +75,11 @@ public class DelegatingCollector extends Collector {
|
|||
public boolean acceptsDocsOutOfOrder() {
|
||||
return delegate.acceptsDocsOutOfOrder();
|
||||
}
|
||||
|
||||
public void finish() throws IOException {
|
||||
if(delegate instanceof DelegatingCollector) {
|
||||
((DelegatingCollector) delegate).finish();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -913,6 +913,10 @@ public class SolrIndexSearcher extends IndexSearcher implements Closeable,SolrIn
|
|||
}
|
||||
}
|
||||
|
||||
if(collector instanceof DelegatingCollector) {
|
||||
((DelegatingCollector) collector).finish();
|
||||
}
|
||||
|
||||
return setCollector.getDocSet();
|
||||
}
|
||||
|
||||
|
@ -1457,6 +1461,9 @@ public class SolrIndexSearcher extends IndexSearcher implements Closeable,SolrIn
|
|||
|
||||
try {
|
||||
super.search(query, luceneFilter, collector);
|
||||
if(collector instanceof DelegatingCollector) {
|
||||
((DelegatingCollector)collector).finish();
|
||||
}
|
||||
}
|
||||
catch( TimeLimitingCollector.TimeExceededException x ) {
|
||||
log.warn( "Query: " + query + "; " + x.getMessage() );
|
||||
|
@ -1493,6 +1500,9 @@ public class SolrIndexSearcher extends IndexSearcher implements Closeable,SolrIn
|
|||
}
|
||||
try {
|
||||
super.search(query, luceneFilter, collector);
|
||||
if(collector instanceof DelegatingCollector) {
|
||||
((DelegatingCollector)collector).finish();
|
||||
}
|
||||
}
|
||||
catch( TimeLimitingCollector.TimeExceededException x ) {
|
||||
log.warn( "Query: " + query + "; " + x.getMessage() );
|
||||
|
@ -1585,6 +1595,9 @@ public class SolrIndexSearcher extends IndexSearcher implements Closeable,SolrIn
|
|||
|
||||
try {
|
||||
super.search(query, luceneFilter, collector);
|
||||
if(collector instanceof DelegatingCollector) {
|
||||
((DelegatingCollector)collector).finish();
|
||||
}
|
||||
}
|
||||
catch( TimeLimitingCollector.TimeExceededException x ) {
|
||||
log.warn( "Query: " + query + "; " + x.getMessage() );
|
||||
|
@ -1622,6 +1635,9 @@ public class SolrIndexSearcher extends IndexSearcher implements Closeable,SolrIn
|
|||
}
|
||||
try {
|
||||
super.search(query, luceneFilter, collector);
|
||||
if(collector instanceof DelegatingCollector) {
|
||||
((DelegatingCollector)collector).finish();
|
||||
}
|
||||
}
|
||||
catch( TimeLimitingCollector.TimeExceededException x ) {
|
||||
log.warn( "Query: " + query + "; " + x.getMessage() );
|
||||
|
|
Loading…
Reference in New Issue