Class 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.
    • Constructor Detail

      • FieldTermStack

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

      • getFieldName

        public java.lang.String getFieldName()
        field name
      • push

        public void push​(FieldTermStack.TermInfo termInfo)
        termInfo - the TermInfo object to be put on the top of the stack
      • isEmpty

        public boolean isEmpty()
        to know whether the stack is empty
        true if the stack is empty, false if not