public interface IndexReaderAccessor
IndexReaders directly, making it possible to query the Lucene indexes directly bypassing Hibernate Search.
The returned IndexReader instances are always read-only and must be closed
close(IndexReader) method on this same instance.
Note: this API is intended for power users intending to extract information directly.
|Modifier and Type||Method and Description|
Closes IndexReader instances obtained using
Opens an IndexReader on all indexes containing the entities passed as parameter.
Opens an IndexReader on all named indexes.
IndexReader open(Class<?>... entities)
The returned IndexReader is read only; writing directly to the index is discouraged. If you
need to write to the index use the
SearchIntegrator.getWorker() to queue change operations to the backend.
The IndexReader should not be closed in other ways except being returned to this instance via
entities- the entity types for which to return a (multi)reader
IllegalArgumentException- if one of the specified classes is not indexed
IndexReader open(String... indexNames)
indexNames- At least one IndexManager name.
SearchException- if the index manager to which the named index belongs failed to start
Copyright © 2006-2017 Red Hat, Inc. All Rights Reserved