Johan,
Have you see this article? https://world.episerver.com/documentation/developer-guides/find/getting-started/adding-search-functionality/ > Restricting search results to diacritic characters
Hi Bob,
Thank you - interestingly enough I hadn't, however I have already tried supplying the appropriate language branch to the client when searching as the example on that page indicates, without success.
To clarify, the way EPiServer documentation states it should work is actually working correctly i.e. on the resulting side of things:
Given a page with the name "Startsida":
EPiServer.Find.Framework.SearchClient.Instance.Search<PageData>().For("stårtsida").GetContentResult();
Returns 1 result
EPiServer.Find.Framework.SearchClient.Instance.Search<PageData>(Language.Swedish).For("stårtsida").GetContentResult();
Returns 0 results (correct)
However, given a page with the name "Miljö" (with a diacritic in it, but searching without the diacritic):
EPiServer.Find.Framework.SearchClient.Instance.Search<PageData>().For("miljo").GetContentResult();
Returns 1 result
EPiServer.Find.Framework.SearchClient.Instance.Search<PageData>(Language.Swedish).For("miljo").GetContentResult();
Returns 1 result (this is my issue, should return 0 results)
Johan,
I have filed a bug for this problem. I will let you know how it develops.
Hello,
I have a similar problem on my side with the french language and Find.
Is there any update on this issue ? Is possible to have the bug number to check if it was fixed ?
Thank you!
To resolve the bug, we updated the documentation. See https://world.episerver.com/documentation/developer-guides/find/getting-started/adding-search-functionality/ >
I'm on CMS 11.10.5, Find 13.0.5.
Using For(query) in all fields or selected fields with no configuration overrides seems to match content regardless of diacritics in the query, e.g. "Miljo" matches content named "Miljö". However when using a specific filter such as Filter(x => x.Name.Matches(query)) the exact letters are matched (as expected/wanted). I've tried specifying the language, analyzer etc and I haven't found any information about special characters, diacritics, invariant strings in the documentation or source code. Is this behavior locked or can it be modified?
Edit: The actual indexed document shows the letters intact (åäö).