Hi All,
I want to map queries for my UI as is to ES
like for the below query
{
"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/2abb261d-a166-48f7-97df-aa4517ffc92e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.