org.apache.lucene.index

## Class FieldInvertState

- java.lang.Object
- - org.apache.lucene.index.FieldInvertState

-     public final class FieldInvertState
      extends java.lang.Object

  This class tracks the number and position / offset parameters of terms being added to the index. The information collected in this class is also used to calculate the normalization factor for a field.

  WARNING: This API is new and experimental, and may suddenly change.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `FieldInvertState()`
    `FieldInvertState(int position, int length, int numOverlap, int offset, float boost)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `AttributeSource` | `getAttributeSource()`
    `float` | `getBoost()` Get boost value.
    `int` | `getLength()` Get total number of terms in this field.
    `int` | `getNumOverlap()` Get the number of terms with `positionIncrement == 0`.
    `int` | `getOffset()` Get end offset of the last processed term.
    `int` | `getPosition()` Get the last processed term position.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### FieldInvertState

          public FieldInvertState()

    - #### FieldInvertState

          public FieldInvertState(int position,
                                  int length,
                                  int numOverlap,
                                  int offset,
                                  float boost)

  - ### Method Detail

    - #### getPosition

          public int getPosition()

      Get the last processed term position.
      Returns:
        the position

    - #### getLength

          public int getLength()

      Get total number of terms in this field.
      Returns:
        the length

    - #### getNumOverlap

          public int getNumOverlap()

      Get the number of terms with `positionIncrement == 0`.
      Returns:
        the numOverlap

    - #### getOffset

          public int getOffset()

      Get end offset of the last processed term.
      Returns:
        the offset

    - #### getBoost

          public float getBoost()

      Get boost value. This is the cumulative product of document boost and field boost for all field instances sharing the same field name.
      Returns:
        the boost

    - #### getAttributeSource

          public AttributeSource getAttributeSource()

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