Package org.apache.lucene.codecs.blockterms

## Class VariableGapTermsIndexWriter.IndexTermSelector

- java.lang.Object
- - org.apache.lucene.codecs.blockterms.VariableGapTermsIndexWriter.IndexTermSelector

- Direct Known Subclasses:
    `VariableGapTermsIndexWriter.EveryNOrDocFreqTermSelector`, `VariableGapTermsIndexWriter.EveryNTermSelector`
  Enclosing class:
    VariableGapTermsIndexWriter

      public abstract static class VariableGapTermsIndexWriter.IndexTermSelector
      extends Object

  Hook for selecting which terms should be placed in the terms index.

  `newField(org.apache.lucene.index.FieldInfo)` is called at the start of each new field, and `isIndexTerm(org.apache.lucene.util.BytesRef, org.apache.lucene.codecs.TermStats)` for each term in that field.

  WARNING: This API is experimental and might change in incompatible ways in the next release.

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `IndexTermSelector()` |

  - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `abstract boolean` | `isIndexTerm​(BytesRef term, TermStats stats)` | Called sequentially on every term being written, returning true if this term should be indexed
    `abstract void` | `newField​(FieldInfo fieldInfo)` | Called when a new field is started.

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

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

- - ### Constructor Detail

    - #### IndexTermSelector

          public IndexTermSelector()

  - ### Method Detail

    - #### isIndexTerm

          public abstract boolean isIndexTerm​(BytesRef term,
                                              TermStats stats)

      Called sequentially on every term being written, returning true if this term should be indexed

    - #### newField

          public abstract void newField​(FieldInfo fieldInfo)

      Called when a new field is started.