0

我尝试使用许多过滤器的设置从 CURL 更新映射。事实上,我想优化我的弹性搜索以获得更好的法语结果

我使用 Elasticsearch 7.0.1 我还在 symfony 4.3 上的 PHP7.4 上使用 Rufli/Elastica

curl -XPUT 'localhost:9200/products/_mapping' -H 'Content-Type: application/json' -d '{
"settings": {
"index":{
"analysis": {
"filter": {
"french_elision": {
"type": "elision","articles_case": true,"articles": ["l", "m", "t", "qu", "n", "s", "j", "d", "c", "jusqu", "quoiqu", "lorsqu", "puisqu"]
},"french_synonym": {
"type": "synonym","ignore_case": true,"expand": true,"synonyms": []
},"french_stemmer": {
"type": "stemmer","language": "light_french"
}
},"analyzer": {
"french_heavy": {
"tokenizer": "icu_tokenizer","filter": ["french_elision","lowercase","icu_folding","french_synonym","french_stemmer"]
},"french_light": {
"tokenizer": "icu_tokenizer","filter": ["french_elision","icu_folding"]
}
}
}
}
}
}'

错误:

{"error":{"root_cause":[{"type":"mapper_parsing_exception","reason":"Root mapping definition has unsupported parameters
4

1 回答 1

0

由于您正在更新设置而不是映射,因此您需要使用_settings端点而不是端点_mapping

curl -XPUT 'localhost:9200/products/_settings' -H 'Content-Type: application/json' -d '{
                                        ^
                                        |
                                   change this
于 2019-06-27T14:19:29.017 回答