public interface SearchIntegrator extends AutoCloseable
org.hibernate.search.SearchFactory contract to
its clients.| Modifier and Type | Method and Description |
|---|---|
void |
addClasses(Class<?>... classes)
Add the following classes to the SearchIntegrator.
|
QueryContextBuilder |
buildQueryBuilder() |
void |
close()
Shuts down all workers and releases all resources.
|
HSQuery |
createHSQuery()
Return an Hibernate Search query object.
|
Analyzer |
getAnalyzer(Class<?> clazz)
Retrieves the scoped analyzer for a given class.
|
Analyzer |
getAnalyzer(String name)
Retrieve an analyzer instance by its definition name
|
TimeoutExceptionFactory |
getDefaultTimeoutExceptionFactory()
Useful if you need to create custom exception types to represent query timeouts.
|
ErrorHandler |
getErrorHandler()
Used to catch exceptions in all synchronous operations; but default they are logged, the user
can configure alternative error management means.
|
EntityIndexBinding |
getIndexBinding(Class<?> entityType)
Returns the entity to index binding for the given type.
|
IndexedTypeDescriptor |
getIndexedTypeDescriptor(Class<?> entityType)
Returns a descriptor for the specified entity type describing its indexed state.
|
Set<Class<?>> |
getIndexedTypes()
Returns the set of currently indexed types.
|
IndexingMode |
getIndexingMode() |
IndexManager |
getIndexManager(String indexName)
Get an
IndexManager using the name |
IndexReaderAccessor |
getIndexReaderAccessor()
Provides access to the IndexReader API
|
ServiceManager |
getServiceManager()
Returns the service manager.
|
Statistics |
getStatistics()
Retrieve the statistics instance for this factory.
|
Worker |
getWorker()
The Worker is the entry point to apply writes and updates to the indexes.
|
boolean |
isStopped() |
BatchBackend |
makeBatchBackend(MassIndexerProgressMonitor progressMonitor) |
void |
optimize()
Optimize all indexes
|
void |
optimize(Class entityType)
Optimize the index holding
entityType |
<T> T |
unwrap(Class<T> cls)
Unwraps some internal Hibernate Search types.
|
EntityIndexBinding getIndexBinding(Class<?> entityType)
entityType - the type for which to retrieve the bindingnull is returned for types which are unindexed or
unknown.void addClasses(Class<?>... classes)
classes - the classes to add to the SearchIntegratorHSQuery createHSQuery()
boolean isStopped()
ErrorHandler getErrorHandler()
TimeoutExceptionFactory getDefaultTimeoutExceptionFactory()
void optimize()
void optimize(Class entityType)
entityTypeentityType - the entity type (index) to optimizeAnalyzer getAnalyzer(String name)
name - the name of the analyzerSearchException - if the definition name is unknownAnalyzer getAnalyzer(Class<?> clazz)
clazz - The class for which to retrieve the analyzer.IllegalArgumentException - in case clazz == null or the specified
class is not an indexed entity.QueryContextBuilder buildQueryBuilder()
Statistics getStatistics()
IndexReaderAccessor getIndexReaderAccessor()
IndexedTypeDescriptor getIndexedTypeDescriptor(Class<?> entityType)
entityType - the entity for which to retrieve the descriptornull IndexedEntityDescriptor. This method can also be called for non indexed types.
To determine whether the entity is actually indexed IndexedTypeDescriptor.isIndexed() can be used.IllegalArgumentException - in case entityType is nullSet<Class<?>> getIndexedTypes()
<T> T unwrap(Class<T> cls)
T - the type of the unwrapped objectcls - the class of the internal object to unwrapServiceManager getServiceManager()
Worker getWorker()
Workervoid close()
close in interface AutoCloseableIndexManager getIndexManager(String indexName)
IndexManager using the nameindexName - the name of the IndexManagerIndexManagerIndexingMode getIndexingMode()
Environment.INDEXING_STRATEGY.BatchBackend makeBatchBackend(MassIndexerProgressMonitor progressMonitor)
Copyright © 2006-2017 Red Hat, Inc. All Rights Reserved