public interface SearchManager
| Modifier and Type | Method and Description |
|---|---|
org.hibernate.search.query.dsl.EntityContext |
buildQueryBuilderForClass(java.lang.Class<?> entityType)
Provides the Hibernate Search DSL entrypoint to build full text queries.
|
org.apache.lucene.analysis.Analyzer |
getAnalyzer(java.lang.Class<?> clazz)
Retrieves the scoped analyzer for a given class type.
|
org.apache.lucene.analysis.Analyzer |
getAnalyzer(java.lang.String name)
Retrieve an analyzer instance by its definition name
|
<E> CacheQuery<E> |
getClusteredQuery(org.apache.lucene.search.Query luceneQuery,
java.lang.Class<?>... classes)
Deprecated.
since 9.2, to be removed in 10.0; equivalent to
getQuery(luceneQuery, IndexedQueryMode.BROADCAST, classes) |
MassIndexer |
getMassIndexer()
The MassIndexer can be used to rebuild the Lucene indexes from the entries stored in Infinispan.
|
<E> CacheQuery<E> |
getQuery(org.apache.lucene.search.Query luceneQuery,
java.lang.Class<?>... classes) |
<E> CacheQuery<E> |
getQuery(org.apache.lucene.search.Query luceneQuery,
IndexedQueryMode indexedQueryMode,
java.lang.Class<?>... classes)
This is a simple method that will just return a
CacheQuery, filtered according to a set of classes passed
in. |
<E> CacheQuery<E> |
getQuery(java.lang.String queryString,
IndexedQueryMode indexedQueryMode,
java.lang.Class<?>... classes)
Builds a
CacheQuery from an Ickle query string. |
org.hibernate.search.stat.Statistics |
getStatistics()
Get access to the Query specific statistics for this SearchManager instance
|
void |
purge(java.lang.Class<?> entityType)
Remove all entities of particular class from the index.
|
<T> T |
unwrap(java.lang.Class<T> cls)
This method gives access to internal Infinispan implementation details, and should not be normally needed.
|
<E> CacheQuery<E> getQuery(org.apache.lucene.search.Query luceneQuery, IndexedQueryMode indexedQueryMode, java.lang.Class<?>... classes)
CacheQuery, filtered according to a set of classes passed
in. If no classes are passed in, it is assumed that no type filtering is performed and so all known types will
be searched.luceneQuery - QueryindexedQueryMode - The IndexedQueryMode used when executing the query.classes - Optionally only return results of type that matches this list of acceptable types.<E> CacheQuery<E> getQuery(java.lang.String queryString, IndexedQueryMode indexedQueryMode, java.lang.Class<?>... classes)
CacheQuery from an Ickle query string.org.hibernate.search.exception.SearchException - if the queryString cannot be converted to an indexed query,
due to lack of indexes to resolve it fully or if contains
aggregations and grouping.getQuery(Query, IndexedQueryMode, Class...)<E> CacheQuery<E> getQuery(org.apache.lucene.search.Query luceneQuery, java.lang.Class<?>... classes)
org.hibernate.search.query.dsl.EntityContext buildQueryBuilderForClass(java.lang.Class<?> entityType)
EntityContext@Deprecated <E> CacheQuery<E> getClusteredQuery(org.apache.lucene.search.Query luceneQuery, java.lang.Class<?>... classes)
getQuery(luceneQuery, IndexedQueryMode.BROADCAST, classes)luceneQuery - classes - MassIndexer getMassIndexer()
org.hibernate.search.stat.Statistics getStatistics()
org.apache.lucene.analysis.Analyzer getAnalyzer(java.lang.String name)
name - the name of the analyzerorg.hibernate.search.exception.SearchException - if the definition name is unknownorg.apache.lucene.analysis.Analyzer getAnalyzer(java.lang.Class<?> clazz)
clazz - The class for which to retrieve the analyzer.java.lang.IllegalArgumentException - in case clazz == null or the specified
class is not an indexed entity.void purge(java.lang.Class<?> entityType)
entityType - The class of the entity to remove.<T> T unwrap(java.lang.Class<T> cls)
cls - the class of the desired internal componentjava.lang.IllegalArgumentException - if the class of the requested internal component is not recognized