Interface MultiIndexReader
-
- All Superinterfaces:
ReleaseableIndexReader
- All Known Implementing Classes:
CachingMultiIndexReader
,JackrabbitIndexReader
,SearchIndex.CombinedIndexReader
public interface MultiIndexReader extends ReleaseableIndexReader
MultiIndexReader
exposes methods to get access to the containedIndexReader
s of thisMultiIndexReader
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description org.apache.jackrabbit.core.query.lucene.ForeignSegmentDocId
createDocId(NodeId id)
Creates a document id for the given node identifier.int
getDocumentNumber(org.apache.jackrabbit.core.query.lucene.ForeignSegmentDocId docId)
Returns the document number for the passeddocId
.IndexReader[]
getIndexReaders()
-
Methods inherited from interface org.apache.jackrabbit.core.query.lucene.ReleaseableIndexReader
release
-
-
-
-
Method Detail
-
getIndexReaders
IndexReader[] getIndexReaders()
- Returns:
- the
IndexReader
s that are contained in thisMultiIndexReader
.
-
createDocId
org.apache.jackrabbit.core.query.lucene.ForeignSegmentDocId createDocId(NodeId id) throws IOException
Creates a document id for the given node identifier.- Parameters:
id
- the id of the node.- Returns:
- a foreign segment doc id or
null
if there is no node with the givenid
. - Throws:
IOException
- if an error occurs while reading from the index.
-
getDocumentNumber
int getDocumentNumber(org.apache.jackrabbit.core.query.lucene.ForeignSegmentDocId docId) throws IOException
Returns the document number for the passeddocId
. If the id is invalid-1
is returned.- Parameters:
docId
- the document id to resolve.- Returns:
- the document number or
-1
if it is invalid (e.g. does not exist). - Throws:
IOException
- if an error occurs while reading from the index.
-
-