## org.apache.lucene.search.vectorhighlight
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
`static class` `FieldTermStack.TermInfo`

Constructor Summary
`FieldTermStack(org.apache.lucene.index.IndexReader reader, int docId, java.lang.String fieldName, FieldQuery fieldQuery)` a constructor.

Method Summary
`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)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### FieldTermStack

    public FieldTermStack(org.apache.lucene.index.IndexReader reader,
                          int docId,
                          java.lang.String fieldName,
                          FieldQuery fieldQuery)
                   throws java.io.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:
    `java.io.IOException`

Method Detail

### main

    public static void main(java.lang.String[] args)
                     throws java.lang.Exception

  Throws:
    `java.lang.Exception`

### 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

Copyright © 2000-2011 Apache Software Foundation. All Rights Reserved.