英文:
How to get the value of `dynamic_date_format` and other mapping Elasticsearch settings
问题
New to Elasticsearch, and we are wondering how to check the current value of dynamic_date_formats
.
The official online document, here, provides the below example of setting customized value, but we did not find how to get its value. Either an API call or a sample URL command will help.
Also, we are looking into the other arguments of the mapping settings, e.g., the Mapping limit settings, including index.mapping.total_fields.limit
and others. So, we wonder how to check the values of these arguments as well.
We highly appreciate any hints and suggestions.
英文:
New to Elasticsearch, and we are wondering how to check the current value of dynamic_date_formats
.
The official online document, here, provides the below example of setting customized value, but we did not find how to get its value. Either an API call or a sample URL command will help.
PUT my-index-000001
{
"mappings": {
"dynamic_date_formats": ["MM/dd/yyyy"]
}
}
Also, we are looking into the other arguments of the mapping settings, e.g., the Mapping limit settings, including index.mapping.total_fields.limit
and others. So, we wonder how to check the values of these arguments as well.
We highly appreciate any hints and suggestions.
答案1
得分: 1
你可以使用以下命令从索引中检索index.mapping.total_fields.limit
或任何其他设置:
GET index/_settings?include_defaults=true&filter_path=**.total_fields
关于dynamic_date_formats
,如果在创建索引时指定了它,可以使用以下命令检索该值:
GET test/_mapping?filter_path=**.dynamic_date_formats
或者如果没有指定,默认值如下,你可以硬编码到你的逻辑中:
[ "strict_date_optional_time","yyyy/MM/dd HH:mm:ss Z||yyyy/MM/dd Z"]
英文:
You can retrieve the index.mapping.total_fields.limit
or any other settings from an index using the command below:
GET index/_settings?include_defaults=true&filter_path=**.total_fields
Regarding dynamic_date_formats
, either you have specified it when creating your index and you can retrieve the value using the command below:
GET test/_mapping?filter_path=**.dynamic_date_formats
Or you haven't specified it and the default value is the following that you can hardcode into your logic
[ "strict_date_optional_time","yyyy/MM/dd HH:mm:ss Z||yyyy/MM/dd Z"]
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论