Interface FacetSearchContextFactory<T extends FacetSearchContext>

All Known Implementing Classes:
DefaultFacetSearchContextFactory

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

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

 try
 {
        final FacetSearchContext facetSearchContext = facetSearchContextFactory.createContext(facetSearchConfig, indexedType, searchQuery);

        // call additional setters on the context object

        facetSearchContextFactory.initializeContext();

        // put your logic here

        facetSearchContextFactory.destroyContext();
 }
 catch (final FacetSearchException | ... | RuntimeException e)
 {
        facetSearchContextFactory.destroyContext(e);
        throw e;
 }