Class FieldTermStack

java.lang.Object
org.apache.lucene.search.vectorhighlight.FieldTermStack

public class FieldTermStack extends Object
FieldTermStack is a stack that keeps query terms in the specified field of the document to be highlighted.
  • Constructor Details

    • FieldTermStack

      public FieldTermStack(IndexReader reader, int docId, String fieldName, FieldQuery fieldQuery) throws IOException
      a constructor.
      Parameters:
      reader - IndexReader of the index
      docId - document id to be highlighted
      fieldName - field of the document to be highlighted
      fieldQuery - FieldQuery object
      Throws:
      IOException - If there is a low-level I/O error
  • Method Details

    • getFieldName

      public String getFieldName()
      Returns:
      field name
    • 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