gpt4 book ai didi

elasticsearch - Elasticsearch在字段创建时使用doc_values

转载 作者:行者123 更新时间:2023-12-03 02:02:58 24 4
gpt4 key购买 nike

根据 flex 文档,您可以通过将doc_values添加到映射中来使用它们。

PUT /music/_mapping/song
{
"properties" : {
"tag": {
"type": "string",
"index" : "not_analyzed",
"doc_values": true
}
}
}

似乎在创建字段时可以自动添加doc_values。

Setting doc_values to true at field creation time is all that is required to use disk-based fielddata instead of in-memory fielddata.



http://www.elastic.co/guide/en/elasticsearch/guide/current/doc-values.html

您如何默认设置此值?

Related SO question

最佳答案

这将是2.0中的标准(默认情况下启用):https://github.com/elastic/elasticsearch/issues/8312

同时,我只能考虑对任何新字段使用动态映射来具有"doc_values": true,否则(对于任何静态映射),您需要针对要启用doc_values的每个字段手动进行此操作。

关于elasticsearch - Elasticsearch在字段创建时使用doc_values,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30059351/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com