如何查看elasticsearch中存储的属性数据?



我们在Elasticsearch中有数据,在映射配置中使用_sourceproperties进行映射。现在我们想看看properties字段中有什么,但似乎找不到一种方法使它们显示在{index}/doc/{docid}输出中。存储数据是因为当我们从属性查询字段时,它会显示正确的结果。你知道我错过了什么吗?

docvalue_fields解决了它。当字段在映射中没有标记为store: true时,它们在使用fields,stored_fields选项时不会显示。我仍然不清楚怎么做和为什么做。

{
"query": {
"match": {
"productNumber": "HQ000003784"
}
},
"docvalue_fields": [
"productNumber"
],
"size": 10,
"from": 0,
"sort": []
}

最新更新