normalize

fun normalize(fieldName: String, text: String): BytesRef

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

This is typically used by query parsers in order to generate a query on a given term, without tokenizing or stemming, which are undesirable if the string to analyze is a partial word (eg. in case of a wildcard or fuzzy query).

This method uses .initReaderForNormalization in order to apply necessary character-level normalization and then .normalize in order to apply the normalizing token filters.