在kibana中过滤以从数组中获取某些数据

时间:2018-01-19 05:44:26

标签: elasticsearch kibana

我的kibana中的数据就像这样

{"code": "A",
 "sentences": [
    {
     "match_num": 1,
     "sentence": "I like apples",
     "date": "20180109"
     },
    {
     "match_num": 0,
     "sentence": "I like kiwi",
     "date": "20180109"
     },
    {
     "match_num": 0,
     "sentence": "I like banana",
     "date": "20180109"
     },
    {
     "match_num": 2,
     "sentence": "I like carrots",
     "date": "20180109"
     }
  ]
}

我想要做的只是提取match_num不为零的句子。我试过句子.match_num:[1 TO *]但是这给出了所有的句子。我想看到的就像下面的

{"code": "A",
 "sentences": [
    {
     "match_num": 1,
     "sentence": "I like apples",
     "date": "20180109"
     },
    {
     "match_num": 2,
     "sentence": "I like carrots",
     "date": "20180109"
     }
  ]
}

0 个答案:

没有答案