Hi,

I have a document like below

{
            "_index": "cpu_usage_metrics",
            "_type": "cpu_usage_metrics",
            "_id": "CKAAs1n8TKiR6FncC5NLGA",
            "_score": 1,
            "_source": {
               "status": 0,
               "occurrences": 1,
               "value": "33",
               "key": "vm.server2.cpu.usage",
               "client": "vm.server2",
               "@timestamp": "2014-06-03T20:18:19+05:30",
               "check_name": "cpu_usage_metrics",
               "address": "10.203.238.138",
               "command": "cpu-usage-metrics.sh"
            }
     }

 I want to do a filtered query with time range using java api like below

"filter": {
                "range": {
                    "@timestamp": {
                         "to": "now",
                        "from": "now - 5mins"
                    }
                }
            }            


Please suggest how to form the Filter in java api.

Thanks,
Subhadip

-- 
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/f596658e-5ec4-42ac-abc1-4f99416be101%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to