[英]Custom metadata for elasticsearch documents
I was wandering what is the best way to add custom metadata for documents in elasticsearch. 我在徘徊是什么是为elasticsearch中的文档添加自定义元数据的最佳方式。
Lets say I have a document of type Test
假设我有一个
Test
类型的文档
"Test": {
"properties": {
"TestName": {
"type": "string"
},
"LastRunTime": {
"type": "string"
},
"id": {
"type": "string"
},
"lastUpdate": {
"type": "string"
}
....
}
And I would like to add for each field name - a display name. 我想为每个字段名称添加一个显示名称。 eg
例如
"TestName": {
"type": "string"
"display_name": "Test Name"
},
"LastRunTime": {
"type": "string"
"display_name": "Last Run Time"
}
What is the best way to do it? 最好的方法是什么? I know there's a field called
_meta
in an index mapping, is this the way to go? 我知道索引映射中有一个名为
_meta
的字段,这是要走的路吗? I would also love if this metadata could be returned in each search query I perform on that index. 如果我在该索引上执行的每个搜索查询中都可以返回此元数据,我也很乐意。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.