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

csharp
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.

csharp
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.

  • IndexerSetup indexer — How text becomes index entries.,or- or one of those passed through.
csharp
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.

  • IndexerSetup indexer — How text becomes index entries.,for small corpora, orfor code and identifier lookup.
  • TokenizerSetup tokenizerSetup — DefaultWord-token delimiters and sizes.is the 20-delimiter production set. Note thatis a single space delimiter, NOT the default.
  • TextNormalizer textNormalizer — DefaultDiacritic folding and string replacement.folds the full table; one built with empty tables folds nothing, which is how normalization is turned off.
  • WordMatcherSetup wordMatcherSetup — DefaultFuzzy matching at search time.enables LD1 and affix matching;supports nothing and is how it is turned off.
  • int filterCacheSize — DefaultFilterCacheSizeFilter cache entries. Omit for. Below the number of live filter keys the cache starts evicting and rebuilding them on next use.
csharp
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.

  • IndexerSetup indexer — As above.
  • TokenizerSetup tokenizerSetup — As above.
  • TextNormalizer textNormalizer — As above.
  • WordMatcherSetup wordMatcherSetup — As above.
  • EmbeddingSetup embeddingSetup — DefaultHow vector fields are held and searched.keeps the search graph's vectors as 16-bit integers.
  • int filterCacheSize — As above.
csharp
TokenizerSetup(Char delimiter =  )
  • Char delimiter — Default:
csharp
TokenizerSetup(Char[] delimiters, bool highResolutionMode, int minimumWordSize = 2)
  • Char[] delimiters
  • bool highResolutionMode
  • int minimumWordSize — Default: 2
csharp
TextNormalizer(ValueTuple<string, string>[] stringReplacements, ValueTuple<Char, Char>[] charReplacements, bool oneWayMode)
  • ValueTuple<string, string>[] stringReplacements
  • ValueTuple<Char, Char>[] charReplacements
  • bool oneWayMode
csharp
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.

  • StringReplacer stringReplacer — The string-replacement half; null means a normalizer that does not do string replacement.
  • CharReplacer charReplacer — The character-folding half; null means a normalizer that does not fold characters.
csharp
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.

  • int MaximumWordSizeExact — Longest word eligible for exact matching. Past this a word is matched by the index's pattern matching alone.
  • int MaximumWordSizeLD1 — MaximumWordSizeExactLongest word eligible for edit-distance-1 matching. Keep at or below.
  • int MinimumWordSizeExact — Shortest word eligible for exact matching.
  • int MinimumWordSizeLD1 — 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.
  • bool SupportLD1 — Allow a one-edit difference — insertion, deletion or substitution — so a typo still finds the word. The forgiving half, and the expensive half.
  • bool SupportAffix — Allow a match on a word that extends the query word, so "fish" reaches "fishing". Prefix-style matching for word tokens.
csharp
CharReplacer(ValueTuple<Char, Char>[] replacements, bool oneWayMode)
  • ValueTuple<Char, Char>[] replacements
  • bool oneWayMode
csharp
CharReplacer(Char[] toBeReplaced, Char[] replaceBy, bool oneWayMode)
  • Char[] toBeReplaced
  • Char[] replaceBy
  • bool oneWayMode
csharp
StringReplacer(string[] toReplace, string[] replaceBy)
  • string[] toReplace
  • string[] replaceBy
csharp
StringReplacer(ValueTuple<string, string>[] replaceMents)
  • ValueTuple<string, string>[] replaceMents

Properties

NameTypeAccessDescription
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

csharp
ConfigurationParameters With(IndexerSetup indexer = null, TokenizerSetup tokenizerSetup = null, TextNormalizer textNormalizer = null, int? filterCacheSize = null, WordMatcherSetup wordMatcherSetup = null, EmbeddingSetup embeddingSetup = null)
  • IndexerSetup indexer — Default: null
  • TokenizerSetup tokenizerSetup — Default: null
  • TextNormalizer textNormalizer — Default: null
  • int? filterCacheSize — Default: null
  • WordMatcherSetup wordMatcherSetup — Default: null
  • EmbeddingSetup embeddingSetup — 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.

csharp
void Save(Stream stream)
  • Stream stream

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.

csharp
static ConfigurationParameters Load(Stream stream)
  • Stream stream

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.

csharp
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.

csharp
static TextNormalizer CreateDefaultOneWay()

Returns: TextNormalizer

ToString

csharp
string ToString()

Returns: string

GetHashCode

csharp
int GetHashCode()

Returns: int

Equals

csharp
bool Equals(object obj)
  • object obj

Returns: bool

<Clone>$

csharp
WordMatcherSetup <Clone>$()

Returns: WordMatcherSetup

Deconstruct

csharp
void Deconstruct(Int32& MaximumWordSizeExact, Int32& MaximumWordSizeLD1, Int32& MinimumWordSizeExact, Int32& MinimumWordSizeLD1, Boolean& SupportLD1, Boolean& SupportAffix)
  • Int32& MaximumWordSizeExact
  • Int32& MaximumWordSizeLD1
  • Int32& MinimumWordSizeExact
  • Int32& MinimumWordSizeLD1
  • Boolean& SupportLD1
  • Boolean& SupportAffix

Replace

Replace will make the actual replacement in the passed argument and return the result as a new string.

csharp
string Replace(string text)
  • string text

Returns: string