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 SearchFactory.
|
QueryContextBuilder |
buildQueryBuilder() |
void |
close()
Shuts down all workers and releases all resources.
|
HSQuery |
createHSQuery()
Return an Hibernate Search query object.
|
org.apache.lucene.analysis.Analyzer |
getAnalyzer(Class<?> clazz)
Retrieves the scoped analyzer for a given class.
|
org.apache.lucene.analysis.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.
|
IndexManager |
getIndexManager(String indexName) |
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() |
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)
HSQuery createHSQuery()
boolean isStopped()
ErrorHandler getErrorHandler()
TimeoutExceptionFactory getDefaultTimeoutExceptionFactory()
void optimize()
void optimize(Class entityType)
entityTypeentityType - the entity type (index) to optimizeorg.apache.lucene.analysis.Analyzer getAnalyzer(String name)
name - the name of the analyzerSearchException - if the definition name is unknownorg.apache.lucene.analysis.Analyzer 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)
ServiceManager getServiceManager()
Worker getWorker()
void close()
close in interface AutoCloseableIndexManager getIndexManager(String indexName)
Copyright © 2006–2014 Hibernate. All rights reserved.