public interface SearchSession
| Modifier and Type | Method and Description |
|---|---|
SearchIndexingPlan |
indexingPlan() |
default MassIndexer |
massIndexer()
Creates a
MassIndexer to rebuild the indexes of all indexed entity types. |
default MassIndexer |
massIndexer(Class<?>... types)
Creates a
MassIndexer to rebuild the indexes mapped to the given types, or to any of their sub-types. |
MassIndexer |
massIndexer(Collection<? extends Class<?>> types)
Creates a
MassIndexer to rebuild the indexes mapped to the given types, or to any of their sub-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> HibernateOrmSearchQueryHitTypeStep<T> |
search(Class<T> type)
Initiate the building of a search query.
|
<T> HibernateOrmSearchQueryHitTypeStep<T> |
search(Collection<? extends Class<? extends T>> types)
Initiate the building of a search query.
|
<T> HibernateOrmSearchQueryHitTypeStep<T> |
search(SearchScope<T> scope)
Initiate the building of a search query.
|
void |
setAutomaticIndexingSynchronizationStrategy(AutomaticIndexingSynchronizationStrategy synchronizationStrategy)
Set the
AutomaticIndexingSynchronizationStrategy to use for this session. |
EntityManager |
toEntityManager() |
Session |
toOrmSession() |
default SearchWorkspace |
workspace()
Create a
SearchWorkspace for the indexes mapped to all indexed types. |
default SearchWorkspace |
workspace(Class<?>... types)
Create a
SearchWorkspace for the indexes mapped to the given type, or to any of its sub-types. |
SearchWorkspace |
workspace(Collection<? extends Class<?>> types)
Create a
SearchWorkspace for the indexes mapped to the given types, or to any of their sub-types. |
default <T> HibernateOrmSearchQueryHitTypeStep<T> search(Class<T> type)
The query will target the indexes mapped to the given type, or to any of its sub-types.
T - An indexed type, or a supertype of all indexed types that will be targeted by the search query.type - An indexed type, or a supertype of all indexed types that will be targeted by the search query.HibernateOrmSearchQueryHitTypeStep<T> HibernateOrmSearchQueryHitTypeStep<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.
T - A supertype of all indexed types that will be targeted by the search query.types - A collection of indexed types, or supertypes of all indexed types that will be targeted by the search query.HibernateOrmSearchQueryHitTypeStep<T> HibernateOrmSearchQueryHitTypeStep<T> search(SearchScope<T> scope)
The query will target the indexes in the given scope.
T - A supertype of all types in the given scope.scope - A scope representing all indexed types that will be targeted by the search query.HibernateOrmSearchQueryHitTypeStepdefault SearchWorkspace workspace()
SearchWorkspace for the indexes mapped to all indexed types.SearchWorkspace.default SearchWorkspace workspace(Class<?>... types)
SearchWorkspace for the indexes mapped to the given type, or to any of its sub-types.types - One or more indexed types, or supertypes of all indexed types that will be targeted by the workspace.SearchWorkspace.SearchWorkspace workspace(Collection<? extends Class<?>> types)
SearchWorkspace for 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 workspace.SearchWorkspace.default MassIndexer massIndexer()
MassIndexer to rebuild the indexes of all indexed entity types.
MassIndexer instances cannot be reused.
default MassIndexer massIndexer(Class<?>... types)
MassIndexer to rebuild 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 targeted by the workspace.MassIndexer massIndexer(Collection<? extends Class<?>> types)
MassIndexer to rebuild 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 workspace.SearchWorkspace.default <T> SearchScope<T> scope(Class<T> type)
SearchScope limited to the given type.T - A type to include in the scope.type - A type to include in the scope.SearchScope<T> SearchScope<T> scope(Collection<? extends Class<? extends T>> types)
SearchScope limited to the given types.T - A supertype of all types to include in the scope.types - A collection of types to include in the scope.SearchScopeSearchIndexingPlan indexingPlan()
EntityManager toEntityManager()
EntityManager used by this SearchSession.Session toOrmSession()
Session used by this SearchSession.void setAutomaticIndexingSynchronizationStrategy(AutomaticIndexingSynchronizationStrategy synchronizationStrategy)
AutomaticIndexingSynchronizationStrategy to use for this session.
Behavior is undefined if called while entity changes are pending: be sure to call this only just after creating a session, or just after committing a transaction.
synchronizationStrategy - The synchronization strategy to useAutomaticIndexingSynchronizationStrategyCopyright © 2006-2019 Red Hat, Inc. and others. Licensed under the GNU Lesser General Public License (LGPL), version 2.1 or later.