我尝试使用许多过滤器设置来更新CURL的映射。 实际上,我想优化我的Elasticsearch以使其在法语中获得更好的结果
我使用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
答案 0 :(得分:0)
由于要更新设置而不是映射,因此需要使用_settings
端点而不是_mapping
端点:
curl -XPUT 'localhost:9200/products/_settings' -H 'Content-Type: application/json' -d '{
^
|
change this