ConfigurationParameters
Everything an engine needs to know about turning text into an index: index sizes, start/stop characters, stop-term limit, the index and search text ceilings, case sensitivity, tokenizer and text-normalizer setup, filter cache size, and word matching.
Constructors
ConfigurationParameters()The production configuration, as a fresh instance: every setting taken from its own type's. Equal toin every respect but identity, so preferunless you specifically want your own object.
ConfigurationParameters(IndexerSetup indexer)The indexing strategy of your choice, everything else as shipped. The short form of the common case: the indexer is the part worth varying, and the tokenizer, normalizer and word matcher rarely are.
IndexerSetupindexer— How text becomes index entries.,or- or one of those passed through.
ConfigurationParameters(IndexerSetup indexer, TokenizerSetup tokenizerSetup, TextNormalizer textNormalizer, WordMatcherSetup wordMatcherSetup, int filterCacheSize = 200000)Builds a configuration from its parts. Every setup object must be stated - passfor the ones you do not care about, which is shorter and safer than copying their values out by hand.
IndexerSetupindexer— How text becomes index entries.,for small corpora, orfor code and identifier lookup.TokenizerSetuptokenizerSetup— DefaultWord-token delimiters and sizes.is the 20-delimiter production set. Note thatis a single space delimiter, NOT the default.TextNormalizertextNormalizer— DefaultDiacritic folding and string replacement.folds the full table; one built with empty tables folds nothing, which is how normalization is turned off.WordMatcherSetupwordMatcherSetup— DefaultFuzzy matching at search time.enables LD1 and affix matching;supports nothing and is how it is turned off.intfilterCacheSize— DefaultFilterCacheSizeFilter cache entries. Omit for. Below the number of live filter keys the cache starts evicting and rebuilding them on next use.
ConfigurationParameters(IndexerSetup indexer, TokenizerSetup tokenizerSetup, TextNormalizer textNormalizer, WordMatcherSetup wordMatcherSetup, EmbeddingSetup embeddingSetup, int filterCacheSize = 200000)DefaultAs the constructor above, with how vector fields are held stated too. The one above takes: an overload, and not one more required argument, so that the many configurations written before vector fields had settings (Oct 2026) keep compiling and keep meaning what they meant.
IndexerSetupindexer— As above.TokenizerSetuptokenizerSetup— As above.TextNormalizertextNormalizer— As above.WordMatcherSetupwordMatcherSetup— As above.EmbeddingSetupembeddingSetup— DefaultHow vector fields are held and searched.keeps the search graph's vectors as 16-bit integers.intfilterCacheSize— As above.
TokenizerSetup(Char delimiter = )Chardelimiter— Default:
TokenizerSetup(Char[] delimiters, bool highResolutionMode, int minimumWordSize = 2)Char[]delimitersboolhighResolutionModeintminimumWordSize— Default: 2
TextNormalizer(ValueTuple<string, string>[] stringReplacements, ValueTuple<Char, Char>[] charReplacements, bool oneWayMode)ValueTuple<string, string>[]stringReplacementsValueTuple<Char, Char>[]charReplacementsbooloneWayMode
TextNormalizer(StringReplacer stringReplacer, CharReplacer charReplacer)Rebuilds a normalizer from its two replacers. This is the shape a normalizer is written out as, so it is mainly the deserialization path rather than something to call by hand — prefer the tuple constructor above.
StringReplacerstringReplacer— The string-replacement half; null means a normalizer that does not do string replacement.CharReplacercharReplacer— The character-folding half; null means a normalizer that does not fold characters.
WordMatcherSetup(int MaximumWordSizeExact = 8, int MaximumWordSizeLD1 = 8, int MinimumWordSizeExact = 2, int MinimumWordSizeLD1 = 3, bool SupportLD1 = false, bool SupportAffix = false)Fuzzy word matching at search time: whether a query word may match an indexed word it does not equal, and within which word lengths.
intMaximumWordSizeExact— Longest word eligible for exact matching. Past this a word is matched by the index's pattern matching alone.intMaximumWordSizeLD1— MaximumWordSizeExactLongest word eligible for edit-distance-1 matching. Keep at or below.intMinimumWordSizeExact— Shortest word eligible for exact matching.intMinimumWordSizeLD1— Shortest word eligible for LD1. Higher than the exact minimum on purpose: at three characters, one edit reaches a large share of the vocabulary and the match stops meaning much.boolSupportLD1— Allow a one-edit difference — insertion, deletion or substitution — so a typo still finds the word. The forgiving half, and the expensive half.boolSupportAffix— Allow a match on a word that extends the query word, so "fish" reaches "fishing". Prefix-style matching for word tokens.
CharReplacer(ValueTuple<Char, Char>[] replacements, bool oneWayMode)ValueTuple<Char, Char>[]replacementsbooloneWayMode
CharReplacer(Char[] toBeReplaced, Char[] replaceBy, bool oneWayMode)Char[]toBeReplacedChar[]replaceBybooloneWayMode
StringReplacer(string[] toReplace, string[] replaceBy)string[]toReplacestring[]replaceBy
StringReplacer(ValueTuple<string, string>[] replaceMents)ValueTuple<string, string>[]replaceMents
Properties
| Name | Type | Access | Description |
|---|---|---|---|
Indexer | IndexerSetup | get | How text becomes index entries: index sizes, character weighting, the stop-word
threshold, case sensitivity, and the indexed-text and search-text ceilings. |
FilterCacheSize | int | get | Size of the filter cache, in entries. |
TextNormalizer | TextNormalizer | get | |
TokenizerSetup | TokenizerSetup | get | |
WordMatcherSetup | WordMatcherSetup | get | LD1 / affix fuzzy matching at search time; null disables it. |
EmbeddingSetup | EmbeddingSetup | get | How vector fields are held and searched. |
Default | ConfigurationParameters | get | The standard production configuration: index size 3 on scalar fields (start characters 2),
sizes 2 and 3 on array fields (start character 1), full diacritic normalization, and the
LD1 + affix word matcher. This is what an engine gets when no configuration is supplied. |
Delimiters | Char[] | get | The token delimiters. Returns a COPY: the array is handed to callers, and a get-only
property protects the reference, never the contents — without the copy,would retune every engine in the
process that took the defaults. |
HighResolutionMode | bool | get/set | HighResolutionMode will make the tokenizer also to generate indexes
after removal of all delimiters. |
MaxSizeOfWordToken | int | get/set | Limits the token size to be indexed. Longer tokens will not be indexed. |
MinimumWordSize | int | get | Defines the minimum wordSize to get, tokenized. Note that this parameter is currently only
used for Field.WordIndexing. |
CharReplacer | CharReplacer | get | return the CharReplacer class. |
StringReplacer | StringReplacer | get | return the StringReplacer. |
MaximumWordSizeExact | int | get/set | Longest word eligible for exact matching. Past this a
word is matched by the index's pattern matching alone. |
MaximumWordSizeLD1 | int | get/set | MaximumWordSizeExactLongest word eligible for edit-distance-1 matching. Keep
at or below. |
MinimumWordSizeExact | int | get/set | Shortest word eligible for exact matching. |
MinimumWordSizeLD1 | int | get/set | Shortest word eligible for LD1. Higher than the exact
minimum on purpose: at three characters, one edit reaches a large share of the vocabulary
and the match stops meaning much. |
SupportLD1 | bool | get/set | Allow a one-edit difference — insertion, deletion or substitution
— so a typo still finds the word. The forgiving half, and the expensive half. |
SupportAffix | bool | get/set | Allow a match on a word that extends the query word, so "fish"
reaches "fishing". Prefix-style matching for word tokens. |
OneWayMode | bool | get/set | When i.e. 'ä' is replaced with 'a' the system will not be able to distinguish a search for
Q = "grä" and a search for Q ="gra". Setting OneWayMode = true will overcome this problem
on the cost of slightly higher resource usage. The overhead will depend on the fraction
of the documents which differs after replacement. |
ToBeReplaced | Char[] | get | StringReplacerThe characters replaced, and what each becomes — the same parallel-array shapeuses. Exposed so a normalizer can be written out and read
back: without it the replacement table was unreachable from the public surface, and a
configuration that round-tripped through JSON came back silently unable to fold
diacritics. It would still index and still search, just differently. |
ReplaceBy | string[] | get | The replacement targets. Returns a COPY — a get-only property protects the reference,
never the contents, and these arrays are reachable from a shared configuration. |
ToReplace | string[] | get |
Methods
With
ConfigurationParameters With(IndexerSetup indexer = null, TokenizerSetup tokenizerSetup = null, TextNormalizer textNormalizer = null, int? filterCacheSize = null, WordMatcherSetup wordMatcherSetup = null, EmbeddingSetup embeddingSetup = null)IndexerSetupindexer— Default: nullTokenizerSetuptokenizerSetup— Default: nullTextNormalizertextNormalizer— Default: nullint?filterCacheSize— Default: nullWordMatcherSetupwordMatcherSetup— Default: nullEmbeddingSetupembeddingSetup— Default: null
Returns: ConfigurationParameters
Save
Writes this configuration as JSON. The counterpart to: what comes back is equal to what went in, property for property, including the diacritic table inside.
void Save(Stream stream)Streamstream
Load
Stream)Reads a configuration written by. The constructor validates it on the way in, so a file that has been hand-edited into nonsense throws here rather than producing an engine that behaves oddly later.
static ConfigurationParameters Load(Stream stream)Streamstream
Returns: ConfigurationParameters
CreateDefaultOneWayNormalizer
Builds the standard Indx one-way text normalizer (diacritic folding + delimiter string replacements). Kept because it is public API; the table itself moved to, which is now its only definition. Returns a fresh instance, as it always did —is the shared one.
static TextNormalizer CreateDefaultOneWayNormalizer()Returns: TextNormalizer
CreateDefaultOneWay
DefaultBuilds a fresh copy of the standard one-way normalizer.is one of these, cached; call this instead when you intend to own the instance.
static TextNormalizer CreateDefaultOneWay()Returns: TextNormalizer
ToString
string ToString()Returns: string
GetHashCode
int GetHashCode()Returns: int
Equals
bool Equals(object obj)objectobj
Returns: bool
<Clone>$
WordMatcherSetup <Clone>$()Returns: WordMatcherSetup
Deconstruct
void Deconstruct(Int32& MaximumWordSizeExact, Int32& MaximumWordSizeLD1, Int32& MinimumWordSizeExact, Int32& MinimumWordSizeLD1, Boolean& SupportLD1, Boolean& SupportAffix)Int32&MaximumWordSizeExactInt32&MaximumWordSizeLD1Int32&MinimumWordSizeExactInt32&MinimumWordSizeLD1Boolean&SupportLD1Boolean&SupportAffix
Replace
Replace will make the actual replacement in the passed argument and return the result as a new string.
string Replace(string text)stringtext
Returns: string