|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IndexReaderAccessor
The IndexReaderAccessor
exposes IndexReader
s 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
using the close(IndexReader)
method on this same instance.
Note: this API is intended for power users intending to extract information directly.
Method Summary | |
---|---|
void |
close(org.apache.lucene.index.IndexReader indexReader)
Closes IndexReader instances obtained using open(Class...) |
org.apache.lucene.index.IndexReader |
open(Class<?>... entities)
Opens an IndexReader on all indexes containing the entities passed as parameter. |
org.apache.lucene.index.IndexReader |
open(String... indexNames)
Opens an IndexReader on all named indexes. |
Method Detail |
---|
org.apache.lucene.index.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
SearchFactoryIntegrator.getWorker()
to queue change operations to the backend.
The IndexReader should not be closed in other ways except being returned to this instance via
close(IndexReader)
.
entities
- the entity types for which to return a (multi)reader
IllegalArgumentException
- if one of the specified classes is not indexedorg.apache.lucene.index.IndexReader open(String... indexNames)
indexNames
- At least one IndexManager name.
SearchException
- if the index manager to which the named index belongs failed to startvoid close(org.apache.lucene.index.IndexReader indexReader)
open(Class...)
indexReader
- the IndexReader to be closed
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |