Interface SearchSession
-
- All Superinterfaces:
AutoCloseable
- All Known Implementing Classes:
InfinispanSearchSession
public interface SearchSession extends AutoCloseable
- Author:
- Fabio Massimo Ercoli
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description org.hibernate.search.mapper.pojo.work.spi.PojoIndexercreateIndexer()default <E> SearchScope<E>scope(Class<E> type)Create aSearchScopelimited to the given type.default <T> SearchScope<T>scope(Class<T> expectedSuperType, String entityName)Create aSearchScopelimited to entity types referenced by their name.<T> SearchScope<T>scope(Class<T> expectedSuperType, Collection<String> entityNames)Create aSearchScopelimited to entity types referenced by their name.<E> SearchScope<E>scope(Collection<? extends Class<? extends E>> types)Create aSearchScopelimited to the given types.<E> org.hibernate.search.engine.search.query.dsl.SearchQuerySelectStep<?,EntityReference,E,?,?,?>search(SearchScope<E> scope)Initiate the building of a search query.-
Methods inherited from interface java.lang.AutoCloseable
close
-
-
-
-
Method Detail
-
search
<E> org.hibernate.search.engine.search.query.dsl.SearchQuerySelectStep<?,EntityReference,E,?,?,?> search(SearchScope<E> scope)
Initiate the building of a search query.The query will target the indexes in the given scope.
- Type Parameters:
E- An entity type to include in the scope.- Parameters:
scope- A scope representing all indexed types that will be targeted by the search query.- Returns:
- The initial step of a DSL where the search query can be defined.
- See Also:
SearchQuerySelectStep
-
scope
default <E> SearchScope<E> scope(Class<E> type)
Create aSearchScopelimited to the given type.- Type Parameters:
E- An entity type to include in the scope.- Parameters:
type- A type to include in the scope.- Returns:
- The created scope.
- See Also:
SearchScope
-
scope
<E> SearchScope<E> scope(Collection<? extends Class<? extends E>> types)
Create aSearchScopelimited to the given types.- Type Parameters:
E- A supertype of all indexed entity types that will be targeted by the search query.- Parameters:
types- A collection of types to include in the scope.- Returns:
- The created scope.
- See Also:
SearchScope
-
scope
default <T> SearchScope<T> scope(Class<T> expectedSuperType, String entityName)
Create aSearchScopelimited to entity types referenced by their name.- Type Parameters:
T- A supertype of all entity types to include in the scope.- Parameters:
expectedSuperType- A supertype of all entity types to include in the scope.entityName- An entity name.- Returns:
- The created scope.
- See Also:
SearchScope
-
scope
<T> SearchScope<T> scope(Class<T> expectedSuperType, Collection<String> entityNames)
Create aSearchScopelimited to entity types referenced by their name.- Type Parameters:
T- A supertype of all entity types to include in the scope.- Parameters:
expectedSuperType- A supertype of all entity types to include in the scope.entityNames- A collection of entity names.- Returns:
- The created scope.
- See Also:
SearchScope
-
createIndexer
org.hibernate.search.mapper.pojo.work.spi.PojoIndexer createIndexer()
-
-