Class InfinispanSearchSession
java.lang.Object
org.hibernate.search.mapper.pojo.session.spi.AbstractPojoSearchSession
org.infinispan.search.mapper.session.impl.InfinispanSearchSession
- All Implemented Interfaces:
AutoCloseable,org.hibernate.search.engine.backend.common.spi.DocumentReferenceConverter<EntityReference>,org.hibernate.search.engine.backend.session.spi.BackendSessionContext,org.hibernate.search.mapper.pojo.automaticindexing.spi.PojoImplicitReindexingResolverSessionContext,org.hibernate.search.mapper.pojo.bridge.runtime.spi.BridgeSessionContext,org.hibernate.search.mapper.pojo.processing.spi.PojoIndexingProcessorSessionContext,org.hibernate.search.mapper.pojo.scope.spi.PojoScopeSessionContext,org.hibernate.search.mapper.pojo.work.spi.PojoWorkSessionContext,SearchSession
public class InfinispanSearchSession
extends org.hibernate.search.mapper.pojo.session.spi.AbstractPojoSearchSession
implements SearchSession, org.hibernate.search.engine.backend.common.spi.DocumentReferenceConverter<EntityReference>
- Author:
- Fabio Massimo Ercoli
-
Constructor Summary
ConstructorsConstructorDescriptionInfinispanSearchSession(InfinispanSearchSessionMappingContext mappingContext, org.hibernate.search.mapper.pojo.loading.spi.PojoSelectionEntityLoader<?> entityLoader, InfinispanTypeContextProvider typeContextProvider) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()org.hibernate.search.mapper.pojo.work.spi.PojoIndexerorg.hibernate.search.mapper.pojo.loading.spi.PojoSelectionLoadingContextfromDocumentReference(org.hibernate.search.engine.backend.common.DocumentReference reference) <T> SearchScope<T>scope(Class<T> expectedSuperType, Collection<String> entityNames) Create aSearchScopelimited to entity types referenced by their name.<E> SearchScopeImpl<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 class org.hibernate.search.mapper.pojo.session.spi.AbstractPojoSearchSession
identifierBridgeFromDocumentIdentifierContext, mappingContext, propertyBridgeWriteContext, routingBridgeRouteContext, typeBridgeWriteContext, valueBridgeFromIndexedValueContextMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.infinispan.search.mapper.session.SearchSession
scope, scope
-
Constructor Details
-
InfinispanSearchSession
public InfinispanSearchSession(InfinispanSearchSessionMappingContext mappingContext, org.hibernate.search.mapper.pojo.loading.spi.PojoSelectionEntityLoader<?> entityLoader, InfinispanTypeContextProvider typeContextProvider)
-
-
Method Details
-
close
public void close()- Specified by:
closein interfaceAutoCloseable
-
search
public <E> org.hibernate.search.engine.search.query.dsl.SearchQuerySelectStep<?,EntityReference, searchE, ?, ?, ?> (SearchScope<E> scope) Description copied from interface:SearchSessionInitiate the building of a search query.The query will target the indexes in the given scope.
- Specified by:
searchin interfaceSearchSession- 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
Description copied from interface:SearchSessionCreate aSearchScopelimited to the given types.- Specified by:
scopein interfaceSearchSession- 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:
-
scope
Description copied from interface:SearchSessionCreate aSearchScopelimited to entity types referenced by their name.- Specified by:
scopein interfaceSearchSession- 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:
-
fromDocumentReference
public EntityReference fromDocumentReference(org.hibernate.search.engine.backend.common.DocumentReference reference) - Specified by:
fromDocumentReferencein interfaceorg.hibernate.search.engine.backend.common.spi.DocumentReferenceConverter<EntityReference>
-
createIndexer
public org.hibernate.search.mapper.pojo.work.spi.PojoIndexer createIndexer()- Specified by:
createIndexerin interfaceSearchSession- Overrides:
createIndexerin classorg.hibernate.search.mapper.pojo.session.spi.AbstractPojoSearchSession
-
tenantIdentifier
- Specified by:
tenantIdentifierin interfaceorg.hibernate.search.engine.backend.session.spi.BackendSessionContext- Specified by:
tenantIdentifierin interfaceorg.hibernate.search.mapper.pojo.bridge.runtime.spi.BridgeSessionContext
-
runtimeIntrospector
- Specified by:
runtimeIntrospectorin interfaceorg.hibernate.search.mapper.pojo.automaticindexing.spi.PojoImplicitReindexingResolverSessionContext- Specified by:
runtimeIntrospectorin interfaceorg.hibernate.search.mapper.pojo.processing.spi.PojoIndexingProcessorSessionContext
-
defaultLoadingContext
public org.hibernate.search.mapper.pojo.loading.spi.PojoSelectionLoadingContext defaultLoadingContext()- Specified by:
defaultLoadingContextin interfaceorg.hibernate.search.mapper.pojo.work.spi.PojoWorkSessionContext
-