org.apache.jackrabbit.core.query.lucene
Class SearchIndex.CombinedIndexReader

java.lang.Object
  extended byorg.apache.lucene.index.IndexReader
      extended byorg.apache.lucene.index.MultiReader
          extended byorg.apache.jackrabbit.core.query.lucene.SearchIndex.CombinedIndexReader
All Implemented Interfaces:
HierarchyResolver
Enclosing class:
SearchIndex

protected static final class SearchIndex.CombinedIndexReader
extends org.apache.lucene.index.MultiReader
implements HierarchyResolver

Combines multiple CachingMultiReader into a MultiReader with HierarchyResolver support.


Constructor Summary
SearchIndex.CombinedIndexReader(CachingMultiReader[] indexReaders)
           
 
Method Summary
 int getParent(int n)
          Returns the document number of the parent of n or -1 if n does not have a parent (n is the root node).
 
Methods inherited from class org.apache.lucene.index.MultiReader
docFreq, doClose, doCommit, document, doDelete, doSetNorm, doUndeleteAll, getFieldNames, getFieldNames, getIndexedFieldNames, getTermFreqVector, getTermFreqVectors, hasDeletions, isDeleted, maxDoc, norms, norms, numDocs, termDocs, termPositions, terms, terms
 
Methods inherited from class org.apache.lucene.index.IndexReader
close, commit, delete, delete, directory, finalize, getCurrentVersion, getCurrentVersion, getCurrentVersion, indexExists, indexExists, indexExists, isLocked, isLocked, lastModified, lastModified, lastModified, open, open, open, setNorm, setNorm, termDocs, termPositions, undeleteAll, unlock
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SearchIndex.CombinedIndexReader

public SearchIndex.CombinedIndexReader(CachingMultiReader[] indexReaders)
                                throws IOException
Method Detail

getParent

public int getParent(int n)
              throws IOException
Description copied from interface: HierarchyResolver
Returns the document number of the parent of n or -1 if n does not have a parent (n is the root node).

Specified by:
getParent in interface HierarchyResolver
Parameters:
n - the document number.
Returns:
the document number of n's parent.
Throws:
IOException - if an error occurs while reading from the index.


Copyright © 2004-2006 The Apache Software Foundation. All Rights Reserved.