Elasticsearch 更新映射分析器
Elasticsearch Update mapping Analyzer
我尝试使用许多过滤器的设置从 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
由于您更新的是设置而不是映射,因此您需要使用 _settings
端点而不是 _mapping
端点:
curl -XPUT 'localhost:9200/products/_settings' -H 'Content-Type: application/json' -d '{
^
|
change this
我尝试使用许多过滤器的设置从 CURL 更新映射。 事实上,我想优化我的 elasticsearch 以获得更好的法语结果
我使用 Elasticsearch 7.0.1 我还在 symfony 4.3
的 PHP7.4 上使用 Rufli/Elasticacurl -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
由于您更新的是设置而不是映射,因此您需要使用 _settings
端点而不是 _mapping
端点:
curl -XPUT 'localhost:9200/products/_settings' -H 'Content-Type: application/json' -d '{
^
|
change this