反应式搜索 自动建议与腹水折叠



>我似乎无法自动建议使用ASCII折叠(即将重音转换为ascii等效项(

<DataSearch
componentId="mainSearch"
dataField="_name"
categoryField="title"
className="search-bar"
queryFormat="and"
placeholder="Search for movies..."
iconPosition="left"
autosuggest={true}
filterLabel="search"
/>

映射

"_name": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
},
"ascii": {
"type": "text",
"analyzer": "autosuggest_analyzer"
},
"ascii2": {
"type": "text",
"analyzer": "ngram_analyzer"
}
}
},

感谢您@David报告此事。

您可以尝试将 ascii 字段添加到 propdataField吗?dataFieldprop 可以接受字符串或数组,因此您可以在那里指定多个字段,示例

<DataSearch
dataField={["_name", "_name.ascii", ...othersIfAny]}
...
/>

最新更新