试图找出如何在天蓝色搜索中获得忽略重音能力。我的申请中的文字是波兰语。对于可搜索的字段,我尝试使用pl.microsoft和pl.lucene分析器。它们都能够将单数形式改为复数形式。我无法实现的是忽略重音。我找到的唯一方法(How to ignore accents in Azure Search?)是使用standardasciifolding.lucene分析器。它忽略了重音,但另一方面不会将形式从单数变为复数。有没有办法组合两台分析仪?
由于
答案 0 :(得分:1)
我认为我找到了一个解决方案,但我不确定这是否是最简单的方法,或者我可能过于复杂:
{
"name": "test",
"fields": [
{
"name": "id",
"type": "Edm.String",
"searchable": false,
"filterable": false,
"retrievable": true,
"sortable": false,
"facetable": false,
"key": true,
"indexAnalyzer": null,
"searchAnalyzer": null,
"analyzer": null
},
{
"name": "name",
"type": "Edm.String",
"searchable": false,
"filterable": true,
"retrievable": true,
"sortable": false,
"facetable": false,
"key": false,
"indexAnalyzer": null,
"searchAnalyzer": "pl_analyzer",
"analyzer": null
}
],
"scoringProfiles": [],
"defaultScoringProfile": "",
"corsOptions": null,
"suggesters": [],
"analyzers":[
{
"name":"pl_analyzer",
"@odata.type":"#Microsoft.Azure.Search.CustomAnalyzer",
"tokenizer":"polish_tokenizer",
"tokenFilters":[ "lowercase", "asciifolding" ]
}],
"tokenizers": [
{
"@odata.type": "#Microsoft.Azure.Search.MicrosoftLanguageStemmingTokenizer",
"name": "polish_tokenizer",
"isSearchTokenizer": true,
"language": "polish"
}
],
"tokenFilters": [],
"charFilters": []
}