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 TermDocs implementations.
static classFilterIndexReader.FilterTermEnum
Base class for filtering TermEnum implementations.
static classFilterIndexReader.FilterTermPositions
Base class for filtering 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)
CollectiongetFieldNames(IndexReader.FieldOption fieldNames)
CollectiongetIndexedFieldNames(Field.TermVector tvSpec)
TermFreqVectorgetTermFreqVector(int docNumber, String field)
TermFreqVector[]getTermFreqVectors(int docNumber)
booleanhasDeletions()
booleanhasNorms(String field)
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)

getFieldNames

public Collection getFieldNames(IndexReader.FieldOption fieldNames)

getIndexedFieldNames

public Collection getIndexedFieldNames(Field.TermVector tvSpec)

getTermFreqVector

public TermFreqVector getTermFreqVector(int docNumber, String field)

getTermFreqVectors

public TermFreqVector[] getTermFreqVectors(int docNumber)

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 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.