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 |
| Constructor and Description |
|---|
FieldTermStack(org.apache.lucene.index.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
|
static void |
main(java.lang.String[] args) |
FieldTermStack.TermInfo |
pop() |
void |
push(FieldTermStack.TermInfo termInfo) |
public FieldTermStack(org.apache.lucene.index.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.IOExceptionpublic static void main(java.lang.String[] args)
throws java.lang.Exception
java.lang.Exceptionpublic 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()
Copyright © 2000-2022 Apache Software Foundation. All Rights Reserved.