My mistake!! the json format was wrong. tried below and it's working fine.

Thanks David 

> {
>     "query": {
>         "filtered": {
>             "query": {
>                 "bool": {
>                     "must": [
>                         {
>                             "range": {
>                                 "NODE_CATEGORY_ID": {
>                                     "gte": 10,
>                                     "lte": 20,
>                                     "boost": 2
>                                 }
>                             }
>                         }
>                     ],
>                     "must_not": [
>                         {
>                             "term": {
>                                 "NODE_ID": {
>                                     "value": "12235"
>                                 }
>                             }
>                         }
>                     ],
>                     "should": [
>                         {
>                             "term": {
>                                 "NODE_PRIVATE_IP_ADDRESS": {
>                                     "value": "10.123.124.125"
>                                 }
>                             }
>                         },
>                         {
>                             "term": {
>                                 "NODE_PUBLIC_IP_ADDRESS": {
>                                     "value": "125.31.108.82"
>                                 }
>                             }
>                         }
>                     ]
>                 }
>             },
>             "filter": {
>                 "range": {
>                     "NODE_CREATE_TIME": {
>                         "from": "2014-03-14 16:22:35",
>                         "to": "2014-03-14 22:43:55"
>                     }
>                 }
>             }
>         }
>     },
>     "sort": [
>         {
>             "NODE_ID": {
>                 "order": "asc"
>             }
>         }
>     ]
> }
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/571c5fe8-3219-46fa-82f4-6d3456e09d07%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to