LimitTokenCountAnalyzer

This Analyzer limits the number of tokens while indexing. It is a replacement for the maximum field length setting inside org.gnit.lucenekmp.index.IndexWriter.

Since

3.1

See also

Constructors

Link copied to clipboard
constructor(delegate: Analyzer, maxTokenCount: Int)

Build an analyzer that limits the maximum number of tokens per field. This analyzer will not consume any tokens beyond the maxTokenCount limit

constructor(delegate: Analyzer, maxTokenCount: Int, consumeAllTokens: Boolean)

Build an analyzer that limits the maximum number of tokens per field.

Properties

Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
open override fun close()
Link copied to clipboard
open override fun getOffsetGap(fieldName: String?): Int
Link copied to clipboard
open override fun getPositionIncrementGap(fieldName: String?): Int
Link copied to clipboard
fun normalize(fieldName: String, text: String): BytesRef
Link copied to clipboard
fun tokenStream(fieldName: String, text: String): TokenStream
fun tokenStream(fieldName: String, reader: Reader): TokenStream
Link copied to clipboard
open override fun toString(): String