public class FieldTermStack extends 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.
|
Constructor and Description |
---|
FieldTermStack(IndexReader reader,
int docId,
String fieldName,
FieldQuery fieldQuery)
a constructor.
|
Modifier and Type | Method and Description |
---|---|
String |
getFieldName() |
boolean |
isEmpty()
to know whether the stack is empty
|
FieldTermStack.TermInfo |
pop() |
void |
push(FieldTermStack.TermInfo termInfo) |
public FieldTermStack(IndexReader reader, int docId, String fieldName, FieldQuery fieldQuery) throws IOException
reader
- IndexReader of the indexdocId
- document id to be highlightedfieldName
- field of the document to be highlightedfieldQuery
- FieldQuery objectIOException
- If there is a low-level I/O errorpublic 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()
Copyright © 2000-2019 Apache Software Foundation. All Rights Reserved.