PUT _all
{
"settings": {
"analysis": {
"analyzer": {
"my_analyzer": {
"tokenizer": "ngram_one_word"
}
},
"tokenizer": {
"ngram_one_word": {
"type": "ngram",
"min_gram": 1,
"max_gram": 16,
"filter": [ "lowercase" ]
}
}
}
}
}
{
"error": {
"root_cause": [
{
"type": "invalid_index_name_exception",
"reason": "Invalid index name [_all], must not start with '_', '-', or '+'",
"index_uuid": "_na_",
"index": "_all"
}
],
"type": "invalid_index_name_exception",
"reason": "Invalid index name [_all], must not start with '_', '-', or '+'",
"index_uuid": "_na_",
"index": "_all"
},
"status": 400
}
不想一个一个设置,求解。
另外问一下能像以前那样 在 elasticsearch.yml 里面全局设置吗 ?
*************************************************************************************
Found index level settings on node level configuration.
Since elasticsearch 5.x index level settings can NOT be set on the nodes
configuration like the elasticsearch.yaml, in system properties or command line
arguments.In order to upgrade all indices the settings must be updated via the
/${index}/_settings API. Unless all settings are dynamic all indices must be closed
in order to apply the upgradeIndices created in the future should use index templates
to set default values.
Please ensure all required values are updated on all indices by executing:
curl -XPUT 'http://localhost:9200/_all/_settings?preserve_existing=true' -d '{
"index.number_of_shards" : "3"
}'
*************************************************************************************
5.0 以后就不让在 yml 设置 index相关配置了
1
misaka19000 2020-08-06 20:57:15 +08:00 1
index template
|
2
pkwenda OP @misaka19000 #1 对哈
|