org.apache.lucene.index

Class FilterIndexReader

public class FilterIndexReader extends IndexReader

A FilterIndexReader contains another IndexReader, which it uses as its basic source of data, possibly transforming the data along the way or providing additional functionality. The class FilterIndexReader itself simply implements all abstract methods of IndexReader with versions that pass all requests to the contained index reader. Subclasses of FilterIndexReader may further override some of these methods and may also provide additional methods and fields.
Nested Class Summary
static classFilterIndexReader.FilterTermDocs
Base class for filtering {@link TermDocs} implementations.
static classFilterIndexReader.FilterTermEnum
Base class for filtering {@link TermEnum} implementations.
static classFilterIndexReader.FilterTermPositions
Base class for filtering {@link TermPositions} implementations.
Field Summary
protected IndexReaderin
Constructor Summary
FilterIndexReader(IndexReader in)

Construct a FilterIndexReader based on the specified base reader.

Method Summary
intdocFreq(Term t)
Documentdocument(int n)
protected voiddoClose()
protected voiddoCommit()
protected voiddoDelete(int n)
protected voiddoSetNorm(int d, String f, byte b)
protected voiddoUndeleteAll()
CollectiongetFieldNames()
CollectiongetFieldNames(boolean indexed)
CollectiongetIndexedFieldNames(boolean storedTermVector)
TermFreqVectorgetTermFreqVector(int docNumber, String field)
TermFreqVector[]getTermFreqVectors(int docNumber)
booleanhasDeletions()
booleanisDeleted(int n)
intmaxDoc()
byte[]norms(String f)
voidnorms(String f, byte[] bytes, int offset)
intnumDocs()
TermDocstermDocs()
TermPositionstermPositions()
TermEnumterms()
TermEnumterms(Term t)

Field Detail

in

protected IndexReader in

Constructor Detail

FilterIndexReader

public FilterIndexReader(IndexReader in)

Construct a FilterIndexReader based on the specified base reader. Directory locking for delete, undeleteAll, and setNorm operations is left to the base reader.

Note that base reader is closed if this FilterIndexReader is closed.

Parameters: in specified base reader.

Method Detail

docFreq

public int docFreq(Term t)

document

public Document document(int n)

doClose

protected void doClose()

doCommit

protected void doCommit()

doDelete

protected void doDelete(int n)

doSetNorm

protected void doSetNorm(int d, String f, byte b)

doUndeleteAll

protected void doUndeleteAll()

getFieldNames

public Collection getFieldNames()

getFieldNames

public Collection getFieldNames(boolean indexed)

getIndexedFieldNames

public Collection getIndexedFieldNames(boolean storedTermVector)

Parameters: storedTermVector if true, returns only Indexed fields that have term vector info, else only indexed fields without term vector info

Returns: Collection of Strings indicating the names of the fields

getTermFreqVector

public TermFreqVector getTermFreqVector(int docNumber, String field)

getTermFreqVectors

public TermFreqVector[] getTermFreqVectors(int docNumber)

hasDeletions

public boolean hasDeletions()

isDeleted

public boolean isDeleted(int n)

maxDoc

public int maxDoc()

norms

public byte[] norms(String f)

norms

public void norms(String f, byte[] bytes, int offset)

numDocs

public int numDocs()

termDocs

public TermDocs termDocs()

termPositions

public TermPositions termPositions()

terms

public TermEnum terms()

terms

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