Example usage for Java org.apache.lucene.index IndexReader fields, constructors, methods, implement or subclass
The text is from its open source code.
void | close() Closes files associated with this index. |
void | decRef() Expert: decreases the refCount of this IndexReader instance. |
int | docFreq(Term term) Returns the number of documents containing the term . |
Document | document(int docID) Returns the stored fields of the n th Document in this index. |
void | document(int docID, StoredFieldVisitor visitor) Expert: visits the fields of a stored document, for custom processing/loading of each field. |
Document | document(int docID, Set Like #document(int) but only loads the specified fields. |
boolean | equals(Object obj) IndexReader subclasses are not allowed to implement equals/hashCode, so methods are declared final. |
IndexReaderContext | getContext() Expert: Returns the root IndexReaderContext for this IndexReader 's sub-reader tree. |
int | getDocCount(String field) Returns the number of documents that have at least one term for this field. |
CacheHelper | getReaderCacheHelper() Optional method: Return a CacheHelper that can be used to cache based on the content of this reader. |
int | getRefCount() Expert: returns the current refCount for this reader |
long | getSumDocFreq(String field) Returns the sum of TermsEnum#docFreq() for all terms in this field. |
long | getSumTotalTermFreq(String field) Returns the sum of TermsEnum#totalTermFreq for all terms in this field. |
Terms | getTermVector(int docID, String field) Retrieve term vector for this document and field, or null if term vectors were not indexed. |
Fields | getTermVectors(int docID) Retrieve term vectors for this document, or null if term vectors were not indexed. |
boolean | hasDeletions() Returns true if any documents have been deleted. |
int | hashCode() IndexReader subclasses are not allowed to implement equals/hashCode, so methods are declared final. |
void | incRef() Expert: increments the refCount of this IndexReader instance. |
List | leaves() Returns the reader's leaves, or itself if this reader is atomic. |
int | maxDoc() Returns one greater than the largest possible document number. |
int | numDeletedDocs() Returns the number of deleted documents. |
int | numDocs() Returns the number of documents in this index. |
long | totalTermFreq(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). |