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 Details

  • Method Details

    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
    • search

      public <E> org.hibernate.search.engine.search.query.dsl.SearchQuerySelectStep<?,EntityReference,E,?,?,?> search(SearchScope<E> scope)
      Description copied from interface: SearchSession
      Initiate the building of a search query.

      The query will target the indexes in the given scope.

      Specified by:
      search in interface SearchSession
      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

      public <E> SearchScopeImpl<E> scope(Collection<? extends Class<? extends E>> types)
      Description copied from interface: SearchSession
      Create a SearchScope limited to the given types.
      Specified by:
      scope in interface SearchSession
      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

      public <T> SearchScope<T> scope(Class<T> expectedSuperType, Collection<String> entityNames)
      Description copied from interface: SearchSession
      Create a SearchScope limited to entity types referenced by their name.
      Specified by:
      scope in interface SearchSession
      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:
      fromDocumentReference in interface org.hibernate.search.engine.backend.common.spi.DocumentReferenceConverter<EntityReference>
    • createIndexer

      public org.hibernate.search.mapper.pojo.work.spi.PojoIndexer createIndexer()
      Specified by:
      createIndexer in interface SearchSession
      Overrides:
      createIndexer in class org.hibernate.search.mapper.pojo.session.spi.AbstractPojoSearchSession
    • tenantIdentifier

      public String tenantIdentifier()
      Specified by:
      tenantIdentifier in interface org.hibernate.search.engine.backend.session.spi.BackendSessionContext
      Specified by:
      tenantIdentifier in interface org.hibernate.search.mapper.pojo.bridge.runtime.spi.BridgeSessionContext
    • runtimeIntrospector

      public InfinispanRuntimeIntrospector runtimeIntrospector()
      Specified by:
      runtimeIntrospector in interface org.hibernate.search.mapper.pojo.automaticindexing.spi.PojoImplicitReindexingResolverSessionContext
      Specified by:
      runtimeIntrospector in interface org.hibernate.search.mapper.pojo.processing.spi.PojoIndexingProcessorSessionContext
    • defaultLoadingContext

      public org.hibernate.search.mapper.pojo.loading.spi.PojoSelectionLoadingContext defaultLoadingContext()
      Specified by:
      defaultLoadingContext in interface org.hibernate.search.mapper.pojo.work.spi.PojoWorkSessionContext