elasticsearch - 如何获取字段的doc_values值?

标签 elasticsearch

如何修改下面的查询以获取字段的doc_values?

flex 2.3
curl http://localhost:9200/_mapping退货{ "my_index": { "mappings": { "my_type": { "properties": { "my_field": { "type": "string", "index": "not_analyzed" } } } } }

最佳答案

curl -X PUT "elasticsearch:9200/my_index?pretty" -H 'Content-Type: application/json' -d' { "mappings": { "my_index": { "properties": { "status_code": { "type": "string", "index": "not_analyzed" }, "session_id": { "type": "string", "index": "not_analyzed", "doc_values": false } } } } }
响应curl "elasticsearch:9200/my_index/_mapping?pretty" { "my_index" : { "mappings" : { "my_index" : { "properties" : { "session_id" : { "type" : "string", "index" : "not_analyzed", "doc_values" : false }, "status_code" : { "type" : "string", "index" : "not_analyzed" } } } } } } doc_values默认为true。在这种情况下未显示。但是显示doc_values == false。

引用:https://www.elastic.co/guide/en/elasticsearch/reference/2.3/doc-values.html

关于elasticsearch - 如何获取字段的doc_values值?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59284031/

相关文章:

elasticsearch - 需要一个Elasticsearch查询,以将结果限制为在一个字段中具有相同值而在另一个字段中具有不同值的结果

elasticsearch - 日期映射在Kibana和ES中不起作用

java - Elasticsearch 正在使用旧的 java 版本运行

elasticsearch - 如何在 Elastic 中远程访问 Kibana

regex - Lucene语法用于更复杂的查询

elasticsearch - Carrot2 + ElasticSearch基本信息流

elasticsearch - Elasticsearch 查找所有文档在字段上包含单词

Elasticsearch - 如何更新文档

docker - kibana opendistro 无法连接到 Docker 上的 ElasticSearch open distro 容器

ruby-on-rails - 如何限制关联的Tire/ElasticSearch结果?