你的位置:首页 > 软件开发 > 数据库 > ElasticSearch 嵌套映射和过滤器及查询

ElasticSearch 嵌套映射和过滤器及查询

发布时间:2016-04-28 06:00:07
ElasticSearch - 嵌套映射和过滤器Because nested objects are indexed as separate hidden documents, we can’t query them directly. Instead ...

ElasticSearch - 嵌套映射和过滤器

Because nested objects are indexed as separate hidden documents, we can’t query them directly. Instead, we have to use the nested query to access them:

GET /my_index/blogpost/_search{ "query": {  "bool": {   "must": [    { "match": { "title": "eggs" }}, ElasticSearch 嵌套映射和过滤器及查询    {     "nested": {      "path": "comments", ElasticSearch 嵌套映射和过滤器及查询      "query": {       "bool": {        "must": [ ElasticSearch 嵌套映射和过滤器及查询         { "match": { "comments.name": "john" }},         { "match": { "comments.age": 28   }}        ]    }}}}   ]}}}Here are some valid indexing examples :

原标题:ElasticSearch 嵌套映射和过滤器及查询

关键词:映射

*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们: admin#shaoqun.com (#换成@)。