Interface IndexerQueryContextFactory<T extends IndexerQueryContext>

All Known Implementing Classes:
DefaultIndexerQueryContextFactory

public interface IndexerQueryContextFactory<T extends IndexerQueryContext>
Implementations of this interface are responsible for creating and destroying instances of IndexerQueryContext.

Code creating/destroying contexts should normally use the following pattern:

 try
 {
        final IndexerQueryContext context = indexerQueryContextFactory.createContext(facetSearchConfig, indexedType, query,
                        queryParameters);
 
        // call additional setters on the context object
 
        indexerQueryContextFactory.initializeContext();
 
        // put your logic here
 
        indexerQueryContextFactory.destroyContext();
 }
 catch (final IndexerException | ... | RuntimeException exception)
 {
        indexerQueryContextFactory.destroyContext(exception);
        throw exception;
 }