StopwordAnalyzerBase

Base class f2or Analyzers that need to make use of stopword sets.

Since

3.1

Inheritors

Types

Link copied to clipboard
object Companion

Creates a new instance initialized with the given stopword set

Properties

Link copied to clipboard
Link copied to clipboard

An immutable stopword set

Link copied to clipboard

Functions

Link copied to clipboard
open override fun close()

Frees persistent resources used by this Analyzer

Link copied to clipboard
open fun getOffsetGap(fieldName: String?): Int

Just like .getPositionIncrementGap, except for Token offsets instead. By default this returns 1. This method is only called if the field produced at least one token for indexing.

Link copied to clipboard
open fun getPositionIncrementGap(fieldName: String?): Int

Invoked before indexing a IndexableField instance if terms have already been added to that field. This allows custom analyzers to place an automatic position increment gap between IndexbleField instances using the same field name. The default value position increment gap is

Link copied to clipboard
fun normalize(fieldName: String, text: String): BytesRef

Normalize a string down to the representation that it would have in the index.

Link copied to clipboard
fun tokenStream(fieldName: String, text: String): TokenStream

Returns a TokenStream suitable for fieldName, tokenizing the contents of text.

fun tokenStream(fieldName: String, reader: Reader): TokenStream

Returns a TokenStream suitable for fieldName, tokenizing the contents of reader.