public interface SearchFactory
Modifier and Type | Method and Description |
---|---|
org.hibernate.search.query.dsl.QueryContextBuilder |
buildQueryBuilder() |
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
|
org.hibernate.search.metadata.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.
|
org.hibernate.search.indexes.IndexFamily |
getIndexFamily(org.hibernate.search.indexes.IndexFamilyType indexFamilyType)
Get an
IndexFamily using the index family type. |
org.hibernate.search.indexes.IndexReaderAccessor |
getIndexReaderAccessor()
Provides access to the IndexReader API
|
org.hibernate.search.stat.Statistics |
getStatistics()
Retrieve the statistics instance for this factory.
|
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.
|
void optimize()
void optimize(Class<?> entityType)
entityType
entityType
- the entity type (index) to optimizeorg.apache.lucene.analysis.Analyzer getAnalyzer(String name)
name
- the name of the analyzerorg.hibernate.search.exception.SearchException
- 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.org.hibernate.search.query.dsl.QueryContextBuilder buildQueryBuilder()
org.hibernate.search.stat.Statistics getStatistics()
org.hibernate.search.indexes.IndexReaderAccessor getIndexReaderAccessor()
org.hibernate.search.metadata.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 null
Set<Class<?>> getIndexedTypes()
org.hibernate.search.indexes.IndexFamily getIndexFamily(org.hibernate.search.indexes.IndexFamilyType indexFamilyType)
IndexFamily
using the index family type.indexFamilyType
- the type of index family to retrieveIndexFamily
, or null if it doesn't exist<T> T unwrap(Class<T> cls)
T
- the type of the unwrapped classcls
- the type to unwrapCopyright © 2019 JBoss by Red Hat. All rights reserved.