public interface SearchFactory
Modifier and Type | Method and Description |
---|---|
QueryContextBuilder |
buildQueryBuilder() |
Analyzer |
getAnalyzer(Class<?> clazz)
Retrieves the scoped analyzer for a given class.
|
Analyzer |
getAnalyzer(String name)
Retrieve an analyzer instance by its definition name
|
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.
|
IndexReaderAccessor |
getIndexReaderAccessor()
Provides access to the IndexReader API
|
Statistics |
getStatistics()
Retrieve the statistics instance for this factory.
|
void |
optimize()
Optimize all indexes
|
void |
optimize(Class entityType)
Optimize the index holding
entityType |
void optimize()
void optimize(Class entityType)
entityType
entityType
- 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 null
Copyright © 2006-2015 Red Hat, Inc. All Rights Reserved