Java org.apache.lucene.index IndexReader fields, constructors, methods, implement or subclass

Example usage for Java org.apache.lucene.index IndexReader fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for org.apache.lucene.index IndexReader.

The text is from its open source code.

Subclass

org.apache.lucene.index.IndexReader has subclasses.
Click this link to see all its subclasses.

Implementation

org.apache.lucene.index.IndexReader has the following implementations.
Click this link to see all its implementation.

Method

voidclose()
Closes files associated with this index.
voiddecRef()
Expert: decreases the refCount of this IndexReader instance.
intdocFreq(Term term)
Returns the number of documents containing the term.
Documentdocument(int docID)
Returns the stored fields of the nth Document in this index.
voiddocument(int docID, StoredFieldVisitor visitor)
Expert: visits the fields of a stored document, for custom processing/loading of each field.
Documentdocument(int docID, Set fieldsToLoad)
Like #document(int) but only loads the specified fields.
booleanequals(Object obj)

IndexReader subclasses are not allowed to implement equals/hashCode, so methods are declared final.

IndexReaderContextgetContext()
Expert: Returns the root IndexReaderContext for this IndexReader 's sub-reader tree.
intgetDocCount(String field)
Returns the number of documents that have at least one term for this field.
CacheHelpergetReaderCacheHelper()
Optional method: Return a CacheHelper that can be used to cache based on the content of this reader.
intgetRefCount()
Expert: returns the current refCount for this reader
longgetSumDocFreq(String field)
Returns the sum of TermsEnum#docFreq() for all terms in this field.
longgetSumTotalTermFreq(String field)
Returns the sum of TermsEnum#totalTermFreq for all terms in this field.
TermsgetTermVector(int docID, String field)
Retrieve term vector for this document and field, or null if term vectors were not indexed.
FieldsgetTermVectors(int docID)
Retrieve term vectors for this document, or null if term vectors were not indexed.
booleanhasDeletions()
Returns true if any documents have been deleted.
inthashCode()

IndexReader subclasses are not allowed to implement equals/hashCode, so methods are declared final.

voidincRef()
Expert: increments the refCount of this IndexReader instance.
Listleaves()
Returns the reader's leaves, or itself if this reader is atomic.
intmaxDoc()
Returns one greater than the largest possible document number.
intnumDeletedDocs()
Returns the number of deleted documents.
intnumDocs()
Returns the number of documents in this index.
longtotalTermFreq(Term term)
Returns the total number of occurrences of term across all documents (the sum of the freq() for each doc that has this term).