VariableGapTermsIndexWriter.IndexTermSelector (Lucene 10.5.1 codecs API)
Description: declaration: package: org.apache.lucene.codecs.blockterms, class: VariableGapTermsIndexWriter, class: IndexTermSelector

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

  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 Details

  - ### IndexTermSelector

    public IndexTermSelector()

- ## Method Details

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