public interface SearchSession
| Modifier and Type | Method and Description |
|---|---|
default MassIndexer |
createIndexer(Class<?>... types)
Deprecated.
Use
massIndexer() or massIndexer(Class[]) instead. |
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. |
default 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.
|
default <T> HibernateOrmSearchQueryHitTypeStep<T> |
search(Collection<? extends Class<? extends T>> types)
Initiate the building of a search query.
|
void |
setAutomaticIndexingSynchronizationStrategy(AutomaticIndexingSynchronizationStrategy synchronizationStrategy)
Set the
AutomaticIndexingSynchronizationStrategy to use for this session. |
EntityManager |
toEntityManager() |
Session |
toOrmSession() |
SearchSessionWritePlan |
writePlan() |
default SearchWriter |
writer()
Create a
SearchWriter for the indexes mapped to all indexed types. |
default SearchWriter |
writer(Class<?>... types)
Create a
SearchWriter for the indexes mapped to the given type, or to any of its sub-types. |
default SearchWriter |
writer(Collection<? extends Class<?>> types)
Create a
SearchWriter 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.HibernateOrmSearchQueryHitTypeStepdefault <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.HibernateOrmSearchQueryHitTypeStepdefault SearchWriter writer()
SearchWriter for the indexes mapped to all indexed types.SearchWriter.default SearchWriter writer(Class<?>... types)
SearchWriter 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 writer.SearchWriter.default SearchWriter writer(Collection<? extends Class<?>> types)
SearchWriter 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 writer.SearchWriter.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 writer.default 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 writer.SearchWriter.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.SearchScope@Deprecated default MassIndexer createIndexer(Class<?>... types)
massIndexer() or massIndexer(Class[]) instead.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.SearchSessionWritePlan writePlan()
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.