ES Count Query Help


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

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

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

CountResponse cr = esClient.prepareCount("test").setIndices("myindex").


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
To view this discussion on the web visit
For more options, visit