elasticsearch - How to include a combination of term and terms filters inside a single bool filter in elastic search? -


i using logstash store logs in elasticsearch database. want logs having particular severitylabel , between time stamps , matches specific message. curl query wrote :

curl -xpost 'localhost:9200/logstash-2015.06.19/_search/?pretty' -d '{ "query": {     "filtered": {         "query": {             "bool": {                 "must": [                     {                         "match": {                             "@message": "session"                         }                     }                 ]             }         },         "filter": {             "bool": {                 "must": [                     {                         "range": {                             "@timestamp": {                                 "gte": "2015-06-19t10:11:44.000z",                                 "lte": "2015-06-19t11:11:44.000z"                             }                         }                     },                     {                         "term": {                             "@app": "sparta"                         }                     },                     {                         "terms": {                             "@severitylabel": [                                 "info",                                 "warn",                                 "error",                                 "fatal",                                 "off"                             ]                         }                     }                 ]             }         }     } } } ' 

it shows 0 documents, matched. using term filter sibling of terms filter, problem?


Comments

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

Kivy: Swiping (Carousel & ScreenManager) -