如何忽略Azure搜索中的重音符号? [英] How to ignore accents in Azure Search?

查看:79
本文介绍了如何忽略Azure搜索中的重音符号?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Azure搜索是否支持某种忽略重音字符的方式?例如,如果有人搜索 e ,则搜索中应包含é个字符.还是在构建Azure搜索索引时需要添加一些转换?

Does Azure Search support some way of ignoring accented characters? For example, if somebody searches for e it should include é characters in the search. Or would we need to add some converting at the moment of building the Azure Search Index?

欢迎任何建议,谢谢.

推荐答案

是.请在您的字段上使用ASCII折叠分析器.为此,请将您字段上的Analyzer属性设置为

Yes. Please use the ASCII folding analyzer on your field. To do that, set the analyzer property on your field to

分析器:"standardasciifolding.lucene"

analyzer:"standardasciifolding.lucene"

或者,使用语言特定的分析器,例如分析器:"fr.microsoft". 要了解有关Azure搜索中分析器的更多信息,请在此处.

Alternatively, use a language specific analyzer e.g. analyzer:"fr.microsoft". To learn more about analyzers in Azure Search take a look here.

注意:不同的语言分析器对待变音符号的方式有所不同,请使用分析API 以测试分析器的行为.

Note: Different language analyzers treat diacritic marks differently, use the Analyze API to test analyzer behavior.

这篇关于如何忽略Azure搜索中的重音符号?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆