ElasticSearch - 在nummur3哈希中的doc_value [英] ElasticSearch - doc_value in murmur3 hash
本文介绍了ElasticSearch - 在nummur3哈希中的doc_value的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
继续上一个问题。
感谢@AndreiStefan我试图放一个使用 doc_values
:
Thanks to @AndreiStefan I'm trying to put a murmur3
hash off the heap, using doc_values
:
"dynamic_templates": [
{
"murmur3_hashed": {
"mapping": {
"index": "not_analyzed",
"norms": {
"enabled": false
},
"fielddata": {
"format": "doc_values"
},
"doc_values": true,
"type": "string",
"fields": {
"hash": {
"index": "no",
"doc_values": true,
"type": "murmur3"
}
}
},
"match_mapping_type": "string",
"match": "my_prop"
}
}
]
我使用stream2es进行重新索引。
I used stream2es for reindexing.
重新索引后,结果属性为:
After a reindexing, the result property is:
"my_prop": {
"index": "not_analyzed",
"fielddata": {
"format": "doc_values"
},
"doc_values": true,
"type": "string",
"fields": {
"hash": {
"null_value": -1,
"precision_step": 2147483647,
"type": "murmur3"
}
}
},
有什么问题?
为什么index:no,doc_values:true
在结果属性中缺少
推荐答案
这是我在ES 1.6.0中测试的命令列表:
This is the list of commands that I tested in ES 1.6.0:
PUT /test
{
"mappings": {
"_default_": {
"dynamic_templates": [
{
"murmur3_hashed": {
"mapping": {
"index": "not_analyzed",
"norms": {
"enabled": false
},
"fielddata": {
"format": "doc_values"
},
"doc_values": true,
"type": "string",
"fields": {
"hash": {
"index": "no",
"doc_values": true,
"type": "murmur3"
}
}
},
"match_mapping_type": "string",
"match": "my_prop"
}
}
]
}
}
}
POST /test/test_type/1
{
"my_prop": "xxx"
}
GET /test/test_type/_mapping
我得到这个输出:
And I got this as output:
{
"test": {
"mappings": {
"test_type": {
"dynamic_templates": [
{
"murmur3_hashed": {
"mapping": {
"fielddata": {
"format": "doc_values"
},
"norms": {
"enabled": false
},
"index": "not_analyzed",
"type": "string",
"fields": {
"hash": {
"index": "no",
"type": "murmur3",
"doc_values": true
}
},
"doc_values": true
},
"match": "my_prop",
"match_mapping_type": "string"
}
}
],
"properties": {
"my_prop": {
"type": "string",
"index": "not_analyzed",
"doc_values": true,
"fielddata": {
"format": "doc_values"
},
"fields": {
"hash": {
"type": "murmur3",
"index": "no",
"doc_values": true,
"precision_step": 2147483647,
"null_value": -1
}
}
}
}
}
}
}
}
这篇关于ElasticSearch - 在nummur3哈希中的doc_value的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文