0

I am using greek characters in my indices and I am trying to search with greek tones.For example if I search with "παλια" I want to get back "παλια" and "παλιά".I am trying to create double mapping for character α but I a get as error "match \"α\" was already added".Here is my code :

 var response = client1.CreateIndex("thetrialindex",
            th =>
                th.Settings(
                    s =>
                        s.Analysis(
                            a =>
                                a.Analyzers(
                                        an =>
                                            an.Custom("my_analyzer",
                                                cu => cu.Tokenizer("keyword").CharFilters("my_char_filter"))
                                               )
                                    .CharFilters(c1=>c1.Mapping("my_char_filter", ma1=>ma1.Mappings("α => ά","α => α")))
                                                                                    )));

1 Answer 1

1

The best way is using IcuTransform with the languages you need. For example for translating latin characters to greek you can use something like that:

.IcuTransform("latingreek", lg => lg.Id("Latin-Greek; NFD; [:Nonspacing 
Mark:] Remove; NFC").Direction(IcuTransformDirection.Forward))

and add this to your index and search analyzer.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.