public interface SearchManager
Modifier and Type | Method and Description |
---|---|
EntityContext |
buildQueryBuilderForClass(Class<?> entityType)
Provides Hibernate Search DSL to build full text queries
|
Analyzer |
getAnalyzer(Class<?> clazz)
Retrieves the scoped analyzer for a given class type.
|
Analyzer |
getAnalyzer(String name)
Retrieve an analyzer instance by its definition name
|
<E> CacheQuery<E> |
getClusteredQuery(Query luceneQuery,
Class<?>... classes)
Deprecated.
since 9.2, use
getQuery(Query, IndexedQueryMode, Class[]) with QueryMode.BROADCAST |
MassIndexer |
getMassIndexer()
The MassIndexer can be used to rebuild the Lucene indexes from
the entries stored in Infinispan.
|
<E> CacheQuery<E> |
getQuery(Query luceneQuery,
Class<?>... classes) |
<E> CacheQuery<E> |
getQuery(Query luceneQuery,
IndexedQueryMode indexedQueryMode,
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(String queryString,
IndexedQueryMode indexedQueryMode,
Class<?>... classes)
Builds a
CacheQuery from a query string. |
Statistics |
getStatistics()
Get access to the Query specific statistics for this SearchManager instance
|
void |
purge(Class<?> entityType)
Remove all entities of particular class from the index.
|
<T> T |
unwrap(Class<T> cls)
This method gives access to internal Infinispan types, and should not be normally needed.
|
<E> CacheQuery<E> getQuery(Query luceneQuery, IndexedQueryMode indexedQueryMode, 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
- Query
indexedQueryMode
- 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(String queryString, IndexedQueryMode indexedQueryMode, Class<?>... classes)
CacheQuery
from a query string.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(Query luceneQuery, Class<?>... classes)
EntityContext buildQueryBuilderForClass(Class<?> entityType)
@Deprecated <E> CacheQuery<E> getClusteredQuery(Query luceneQuery, Class<?>... classes)
getQuery(Query, IndexedQueryMode, Class[])
with QueryMode.BROADCASTluceneQuery
- classes
- MassIndexer getMassIndexer()
Analyzer getAnalyzer(String name)
name
- the name of the analyzerSearchException
- if the definition name is unknownStatistics getStatistics()
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.void purge(Class<?> entityType)
entityType
- The class of the entity to remove.<T> T unwrap(Class<T> cls)
Copyright © 2018 JBoss, a division of Red Hat. All rights reserved.