Constructor and Description |
---|
DocumentsImpl(IndexReader reader)
Constructs an DocumentsImpl that holds given
IndexReader . |
Modifier and Type | Method and Description |
---|---|
Optional<Term> |
firstTerm(String field)
Returns the first indexed term in the specified field.
|
Optional<Integer> |
firstTermDoc()
Returns the first document id (posting) associated with the current term.
|
String |
getCurrentField()
Returns the current target field name.
|
Optional<Integer> |
getDocFreq()
Returns the document frequency for the current term (the number of documents containing the current term.)
Empty Optional instance is returned if the terms iterator has not been positioned yet.
|
List<DocumentField> |
getDocumentFields(int docid)
Returns the list of field information and field data for the specified document.
|
Optional<DocValues> |
getDocValues(int docid,
String field)
Returns the doc values for the specified field in the specified document.
|
int |
getMaxDoc()
Returns one greater than the largest possible document number.
|
List<TermPosting> |
getTermPositions()
Returns the list of the position information for the current posting.
|
List<TermVectorEntry> |
getTermVectors(int docid,
String field)
Returns the term vectors for the specified field in the specified document.
|
boolean |
isLive(int docid)
Returns true if the document with the specified
docid is not deleted, otherwise false. |
Optional<Term> |
nextTerm()
Increments the terms iterator and returns the next indexed term for the target field.
|
Optional<Integer> |
nextTermDoc()
Increments the postings iterator and returns the next document id (posting) for the current term.
|
Optional<Term> |
seekTerm(String termText)
Seeks to the specified term, if it exists, or to the next (ceiling) term.
|
getFieldNames
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getFieldNames
public DocumentsImpl(IndexReader reader)
IndexReader
.reader
- - the index readerpublic int getMaxDoc()
Documents
public boolean isLive(int docid)
Documents
docid
is not deleted, otherwise false.public List<DocumentField> getDocumentFields(int docid)
Documents
getDocumentFields
in interface Documents
docid
- - document idpublic String getCurrentField()
Documents
getCurrentField
in interface Documents
public Optional<Term> firstTerm(String field)
Documents
public Optional<Term> nextTerm()
Documents
public Optional<Term> seekTerm(String termText)
Documents
public Optional<Integer> firstTermDoc()
Documents
firstTermDoc
in interface Documents
public Optional<Integer> nextTermDoc()
Documents
nextTermDoc
in interface Documents
public List<TermPosting> getTermPositions()
Documents
getTermPositions
in interface Documents
public Optional<Integer> getDocFreq()
Documents
getDocFreq
in interface Documents
public List<TermVectorEntry> getTermVectors(int docid, String field)
Documents
getTermVectors
in interface Documents
docid
- - document idfield
- - field namepublic Optional<DocValues> getDocValues(int docid, String field)
Documents
getDocValues
in interface Documents
docid
- - document idfield
- - field nameCopyright © 2000-2021 Apache Software Foundation. All Rights Reserved.