public final class IndexSearcherWrappingService extends Object
DirectoryReader and IndexSearcher of a Engine.Searcher via the
configured IndexSearcherWrapper instance. This allows custom functionally to be added the Engine.Searcher
before being used to do an operation (search, get, field stats etc.)| Constructor and Description |
|---|
IndexSearcherWrappingService(Set<IndexSearcherWrapper> wrappers) |
| Modifier and Type | Method and Description |
|---|---|
Engine.Searcher |
wrap(EngineConfig engineConfig,
Engine.Searcher engineSearcher)
If there are configured
IndexSearcherWrapper instances, the IndexSearcher of the provided engine searcher
gets wrapped and a new Engine.Searcher instances is returned, otherwise the provided Engine.Searcher is returned. |
@Inject public IndexSearcherWrappingService(Set<IndexSearcherWrapper> wrappers)
public final Engine.Searcher wrap(EngineConfig engineConfig, Engine.Searcher engineSearcher) throws IOException
IndexSearcherWrapper instances, the IndexSearcher of the provided engine searcher
gets wrapped and a new Engine.Searcher instances is returned, otherwise the provided Engine.Searcher is returned.
This is invoked each time a Engine.Searcher is requested to do an operation. (for example search)IOExceptionCopyright © 2009–2017. All rights reserved.