public class FieldTermStack
extends java.lang.Object
FieldTermStack
is a stack that keeps query terms in the specified field
of the document to be highlighted.Modifier and Type | Class and Description |
---|---|
static class |
FieldTermStack.TermInfo
Single term with its position/offsets in the document and IDF weight.
|
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
fieldName |
(package private) java.util.LinkedList<FieldTermStack.TermInfo> |
termList |
Constructor and Description |
---|
FieldTermStack(IndexReader reader,
int docId,
java.lang.String fieldName,
FieldQuery fieldQuery)
a constructor.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getFieldName() |
boolean |
isEmpty()
to know whether the stack is empty
|
FieldTermStack.TermInfo |
pop() |
void |
push(FieldTermStack.TermInfo termInfo) |
private final java.lang.String fieldName
java.util.LinkedList<FieldTermStack.TermInfo> termList
public FieldTermStack(IndexReader reader, int docId, java.lang.String fieldName, FieldQuery fieldQuery) throws java.io.IOException
reader
- IndexReader of the indexdocId
- document id to be highlightedfieldName
- field of the document to be highlightedfieldQuery
- FieldQuery objectjava.io.IOException
- If there is a low-level I/O errorpublic java.lang.String getFieldName()
public FieldTermStack.TermInfo pop()
public void push(FieldTermStack.TermInfo termInfo)
termInfo
- the TermInfo object to be put on the top of the stackpublic boolean isEmpty()