TermStates
Maintains a IndexReader view over IndexReader instances containing a single term. The TermStates doesn't track if the given TermState objects are valid, neither if the TermState instances refer to the same terms in the associated readers.
Constructors
Creates an empty TermStates from a IndexReaderContext
Creates a TermStates with an initial TermState, IndexReader pair.
Functions
Expert: Accumulate term statistics.
Clears the TermStates internal state and removes all registered TermStates
Returns a Supplier for a TermState for the given LeafReaderContext. This may return null if some cheap checks help figure out that this term doesn't exist in this leaf. The Supplier may then also return null if the term doesn't exist.
Expert: Registers and associates a TermState with an leaf ordinal. The leaf ordinal should be derived from a IndexReaderContext's leaf ord. On the contrary to .register this method does NOT update term statistics.
Registers and associates a TermState with an leaf ordinal. The leaf ordinal should be derived from a IndexReaderContext's leaf ord.
Returns the accumulated term frequency of all TermState instances passed to .register.
Expert: Return whether this TermStates was built for the given [ ]. This is typically used for assertions.