Class LuceneIndexScopeImpl

java.lang.Object
org.hibernate.search.backend.lucene.scope.impl.LuceneIndexScopeImpl
All Implemented Interfaces:
LuceneIndexScope, IndexScope

public class LuceneIndexScopeImpl extends Object implements IndexScope, LuceneIndexScope
  • Constructor Details

  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • searchScope

      public LuceneSearchQueryIndexScope<?> searchScope()
      Specified by:
      searchScope in interface IndexScope
    • openIndexReader

      public org.apache.lucene.index.IndexReader openIndexReader(Set<String> routingKeys)
      Description copied from interface: LuceneIndexScope
      Opens an IndexReader on shards assigned to the given routing keys for all indexes containing the entities of the search scope.

      The instance must be closed after its use by the client of this class using IndexReader.close().

      WARNING: Even if multi-tenancy is enabled, the returned reader exposes documents of *all* tenants.

      Specified by:
      openIndexReader in interface LuceneIndexScope
      Parameters:
      routingKeys - A collection containing zero, one or multiple string keys.
      Returns:
      an IndexReader containing the entities of the index scope