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.
This commit is contained in:
Simon Willnauer 2019-06-21 10:28:47 +02:00 committed by GitHub
parent d318a6e3f9
commit b3e759a658
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 0 deletions

View File

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