Hi All,
I want to map queries from my UI as is to ES
like for the below query
{
"filtered": {
"filter": {
"range": {
"ISMobileNumber": {
"lt": 8332453735
}
}
}
},
"aggs" : {
"single_avg_price": {
"avg" : { "field" : "ISMobileNumber" }
}
}
}
when i do the following
searchResponse =
transportClient.prepareSearch("ind1").addField("ISMobileNumber")
.setTypes("type")
.setQuery(new
String(Files.readAllBytes(Paths.get("/home/ESDocs/Query/Query4.txt"))))
.setSize(scrollSize)
.setFrom(j*scrollSize)
.execute()
.actionGet();
I am not able to aggregate i have to add them seperatly by doing
.addAggregation(),is there any way by which i can pass the entire query as
a string and get the output
--
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/b1dcf256-e97c-4d50-b199-a4006bac6498%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.