You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by si...@apache.org on 2019/06/21 08:30:45 UTC
[lucene-solr] branch branch_8x updated: Expose IndexSearchers
executor in order to enable searcher cloning (#732)
This is an automated email from the ASF dual-hosted git repository.
simonw pushed a commit to branch branch_8x
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git
The following commit(s) were added to refs/heads/branch_8x by this push:
new 4ea9775 Expose IndexSearchers executor in order to enable searcher cloning (#732)
4ea9775 is described below
commit 4ea97758c8582a757740fc34cbef19c2f53215f4
Author: Simon Willnauer <si...@apache.org>
AuthorDate: Fri Jun 21 10:28:47 2019 +0200
Expose IndexSearchers executor in order to enable searcher cloning (#732)
Today if an executor was added to the IndexSearcher it's impossible to
clone the searcher with it's cache, similarty and caching policy since
the executor is not exposed. This adds a simple getter to make cloning
easier.
---
lucene/core/src/java/org/apache/lucene/search/IndexSearcher.java | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/lucene/core/src/java/org/apache/lucene/search/IndexSearcher.java b/lucene/core/src/java/org/apache/lucene/search/IndexSearcher.java
index b6b85b9..72d3d12 100644
--- a/lucene/core/src/java/org/apache/lucene/search/IndexSearcher.java
+++ b/lucene/core/src/java/org/apache/lucene/search/IndexSearcher.java
@@ -847,4 +847,11 @@ public class IndexSearcher {
}
return new CollectionStatistics(field, reader.maxDoc(), docCount, sumTotalTermFreq, sumDocFreq);
}
+
+ /**
+ * Returns this searchers executor or <code>null</code> if no executor was provided
+ */
+ public Executor getExecutor() {
+ return executor;
+ }
}