ES Count Query Help

Friends,

I am trying to query ES every minute for count. I have the following
code. I am having tough time adding the time filter. Looks like lot has
changed since 1.1.0 java elasticsearch api. Can you point me to the right
directions?

Settings settings = ImmutableSettings.settingsBuilder().put("cluster.name",
"test").build();
Client esClient = new TransportClient(settings).addTransportAddress(new
InetSocketTransportAddress("myhostname", port));

//FieldQueryBuilder hotelQuery=QueryBuilders.fieldQuery("prodName","Air");

CountResponse cr = esClient.prepareCount("test").setIndices("myindex").
setQuery(termQuery("_type","mytype")).execute().actionGet();

System.out.println(cr.getCount());

--
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 elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/281b53a3-da04-48a2-a90a-05198931df73%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.