gpt4 book ai didi

php - Elasticsearch-ICU排序规则关键字字段-挪威语- Elasticsearch 在排序时被视为å

转载 作者:行者123 更新时间:2023-12-02 22:47:27 25 4
gpt4 key购买 nike

我在Symfony 4.4中的fos上使用了 flex 搜索elasticsearch:6.8.4,由 friendsofsymfony / elastica-bundle“:” ^ 5.0“
我在fos_elastica.yaml中遇到带有配置的排序字段问题。我的配置像:

 user_first_name_sort: {type: icu_collation_keyword, language: nb, index: true}
可以按预期对 挪威语语言正常工作。但是,单词 flex 搜索在排序时会被视为 。例:
enter image description here
我如何忽略隐式转让?

最佳答案

根据Wikipedia on the Norwegian alphabet

The letter Å (HTML å) was introduced in Norwegian in 1917,replacing Aa or aa.
[...]
Family names may not follow modern orthography, and as such retain the digraph aa where å would be used today.


更具体地说是关于归类的主题

Aa is treated like Å in alphabetical sorting, not like two adjacentletters A, meaning that while a is the first letter of the alphabet,aa is the last.


您的排序顺序工作正常。

关于php - Elasticsearch-ICU排序规则关键字字段-挪威语- Elasticsearch 在排序时被视为å,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64585310/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com