考虑这样的Elasticsearch文档:搜索嵌套文档的领域,无论外地的定位
{
"id": 1,
"Comment": "Comment text",
"Reply": [{
"id": 2,
"Comment": "Nested comment text",
}, {
"id": 3,
"Comment": "Another nested comment text",
}]
}
我要搜索id == 2
不知道它是否是在文档的创举水平或在第二。这可能吗?请记住,嵌套级别可以是任何东西(在开发时未知)。
如果可能,通过搜索id == 2
而不知道文档的第二级中有id
而返回此文档的查询是什么?
你知道,在ES'nested'有着特殊的意义。那么这个领域真的是[嵌套](https://www.elastic.co/guide/en/elasticsearch/reference/2.0/nested.html)领域? –
我不好,你说得对。我错过了这个例子。我会更新干。谢谢。但问题依然如此。 – Mehran