How to add token_chars: symbol using linq notation?

I want that I can also search for symbols like "§123".
I find that I should add token_chars: symbol.
(example)

"token_chars": ["letter", "digit", "punctuation", "symbol"]

At my C#-code I'm using elasticClient.Indices.Create() and linq syntax.
How can I implement token_chars: symbol at my setting?

CreateIndexResponse createIndexResponse = elasticClient.Indices.Create(sep.DefaultIndex, c => c
    .Settings(s => s
        .Analysis(a => a
            .Analyzers(ad => ad
                .Custom("windows_path_hierarchy_analyzer", ca => ca
                    .Tokenizer("windows_path_hierarchy_tokenizer")
                )
            )
            .Tokenizers(t => t
                .PathHierarchy("windows_path_hierarchy_tokenizer", ph => ph
                    .Delimiter('\\')
                )
            )
        )
    )
    .Map<ElasticDocument>(mp => mp
        .AutoMap()
        .Properties(ps => ps
            .Text(s => s
                .Name(n => n.Path)
                .Analyzer("windows_path_hierarchy_analyzer")
            )
            .Object<Attachment>(a => a
                .Name(n => n.Attachment)
                .AutoMap()
            )
        )
    )
);

I find the solution technically.
But still "§" is not found.

.Tokenizers(t => t
    .PathHierarchy("windows_path_hierarchy_tokenizer", ph => ph
        .Delimiter('\\')
    )
    .NGram("ngram_tokenizer", td => td
    .MinGram(2)
    .MaxGram(20)
    .TokenChars(
        TokenChar.Letter,
        TokenChar.Digit,
        TokenChar.Symbol)
)
)

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.