org.apache.lucene.index

Class MultiReader

public class MultiReader extends IndexReader

An IndexReader which reads multiple indexes, appending their content.

Version: $Id: MultiReader.java 523302 2007-03-28 12:58:15Z gsingers $

Constructor Summary
MultiReader(IndexReader[] subReaders)

Construct a MultiReader aggregating the named set of (sub)readers.

Method Summary
intdocFreq(Term t)
Documentdocument(int n, FieldSelector fieldSelector)
protected voiddoClose()
protected voiddoCommit()
protected voiddoDelete(int n)
protected voiddoSetNorm(int n, String field, byte value)
protected voiddoUndeleteAll()
CollectiongetFieldNames(IndexReader.FieldOption fieldNames)
TermFreqVectorgetTermFreqVector(int n, String field)
TermFreqVector[]getTermFreqVectors(int n)
booleanhasDeletions()
booleanhasNorms(String field)
booleanisDeleted(int n)
intmaxDoc()
byte[]norms(String field)
voidnorms(String field, byte[] result, int offset)
intnumDocs()
TermDocstermDocs()
TermPositionstermPositions()
TermEnumterms()
TermEnumterms(Term term)

Constructor Detail

MultiReader

public MultiReader(IndexReader[] subReaders)

Construct a MultiReader aggregating the named set of (sub)readers. Directory locking for delete, undeleteAll, and setNorm operations is left to the subreaders.

Note that all subreaders are closed if this Multireader is closed.

Parameters: subReaders set of (sub)readers

Throws: IOException

Method Detail

docFreq

public int docFreq(Term t)

document

public Document document(int n, FieldSelector fieldSelector)

doClose

protected void doClose()

doCommit

protected void doCommit()

doDelete

protected void doDelete(int n)

doSetNorm

protected void doSetNorm(int n, String field, byte value)

doUndeleteAll

protected void doUndeleteAll()

getFieldNames

public Collection getFieldNames(IndexReader.FieldOption fieldNames)

getTermFreqVector

public TermFreqVector getTermFreqVector(int n, String field)

getTermFreqVectors

public TermFreqVector[] getTermFreqVectors(int n)

hasDeletions

public boolean hasDeletions()

hasNorms

public boolean hasNorms(String field)

isDeleted

public boolean isDeleted(int n)

maxDoc

public int maxDoc()

norms

public byte[] norms(String field)

norms

public void norms(String field, byte[] result, int offset)

numDocs

public int numDocs()

termDocs

public TermDocs termDocs()

termPositions

public TermPositions termPositions()

terms

public TermEnum terms()

terms

public TermEnum terms(Term term)
Copyright © 2000-2007 Apache Software Foundation. All Rights Reserved.