public interface SearchSession
| Modifier and Type | Method and Description |
|---|---|
MassIndexer |
createIndexer(Class<?>... types)
Creates a
MassIndexer to rebuild the indexes of some or all indexed entity types. |
default <T> SearchScope<T> |
scope(Class<T> type)
Create a
SearchScope limited to the given type. |
<T> SearchScope<T> |
scope(Collection<? extends Class<? extends T>> types)
Create a
SearchScope limited to the given types. |
default <T> SearchQueryResultDefinitionContext<T> |
search(Class<T> type)
Initiate the building of a search query.
|
default <T> SearchQueryResultDefinitionContext<T> |
search(Collection<? extends Class<? extends T>> types)
Initiate the building of a search query.
|
EntityManager |
toEntityManager() |
Session |
toOrmSession() |
default <T> SearchQueryResultDefinitionContext<T> search(Class<T> type)
The query will target the indexes mapped to the given type, or to any of its sub-types.
type - An indexed type, or a supertype of all indexed types that will be targeted by the search query.get the resulting query.SearchQueryResultDefinitionContextdefault <T> SearchQueryResultDefinitionContext<T> search(Collection<? extends Class<? extends T>> types)
The query will target the indexes mapped to the given types, or to any of their sub-types.
types - A collection of indexed types, or supertypes of all indexed types that will be targeted by the search query.get the resulting query.SearchQueryResultDefinitionContextdefault <T> SearchScope<T> scope(Class<T> type)
SearchScope limited to the given type.type - An type to include in the scope.SearchScope<T> SearchScope<T> scope(Collection<? extends Class<? extends T>> types)
SearchScope limited to the given types.types - A collection of types to include in the scope.SearchScopeMassIndexer createIndexer(Class<?>... types)
MassIndexer to rebuild the indexes of some or all indexed entity types.
The indexer will apply to the indexes mapped to the given types, or to any of their sub-types.
MassIndexer instances cannot be reused.
types - An array of indexed types, or supertypes of all indexed types that will be reindexed.
If empty, all indexed types will be reindexed.EntityManager toEntityManager()
EntityManager used by this SearchSession.Session toOrmSession()
Session used by this SearchSession.Copyright © 2006-2019 Red Hat, Inc. and others. Licensed under the GNU Lesser General Public License (LGPL), version 2.1 or later.