Class FieldTermStack
- java.lang.Object
-
- org.apache.lucene.search.vectorhighlight.FieldTermStack
-
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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
FieldTermStack.TermInfo
Single term with its position/offsets in the document and IDF weight.
-
Constructor Summary
Constructors Constructor Description FieldTermStack(IndexReader reader, int docId, java.lang.String fieldName, FieldQuery fieldQuery)
a constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getFieldName()
boolean
isEmpty()
to know whether the stack is emptyFieldTermStack.TermInfo
pop()
void
push(FieldTermStack.TermInfo termInfo)
-
-
-
Constructor Detail
-
FieldTermStack
public FieldTermStack(IndexReader reader, int docId, java.lang.String fieldName, FieldQuery fieldQuery) throws java.io.IOException
a constructor.- Parameters:
reader
- IndexReader of the indexdocId
- document id to be highlightedfieldName
- field of the document to be highlightedfieldQuery
- FieldQuery object- Throws:
java.io.IOException
- If there is a low-level I/O error
-
-
Method Detail
-
getFieldName
public java.lang.String getFieldName()
- Returns:
- field name
-
pop
public FieldTermStack.TermInfo pop()
- Returns:
- the top TermInfo object of the stack
-
push
public void push(FieldTermStack.TermInfo termInfo)
- Parameters:
termInfo
- the TermInfo object to be put on the top of the stack
-
isEmpty
public boolean isEmpty()
to know whether the stack is empty- Returns:
- true if the stack is empty, false if not
-
-