mirror of https://github.com/apache/lucene.git
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:
parent
d318a6e3f9
commit
b3e759a658
|
@ -847,4 +847,11 @@ public class IndexSearcher {
|
||||||
}
|
}
|
||||||
return new CollectionStatistics(field, reader.maxDoc(), docCount, sumTotalTermFreq, sumDocFreq);
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue