Hi Folks, Any inputs?
Regards Piyush On Tuesday, 10 February 2015 16:23:43 UTC+5:30, piyush goyal wrote: > > I don't need the query part. All I need is a filter. > > Not sure how matchAllQuery will help. > > On Tuesday, 10 February 2015 16:14:51 UTC+5:30, David Pilato wrote: >> >> Use a matchAllQuery for the query part. >> All scores will be set to 1. >> >> -- >> David ;-) >> Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs >> >> Le 10 févr. 2015 à 11:24, piyush goyal <[email protected]> a écrit : >> >> Hi All, >> >> If I try to write a filtered query through sense, it allows me to just >> add a filter and query is not a mandatory field. For example: >> { >> "query": { >> "filtered": { >> "filter": { >> "term": { >> "response_timestamp": "2015-01-01" >> } >> } >> } >> } >> >> is a valid query through sense. However, if I try to implement the same >> through JAVA API, I have to use the abstract class QueryBuilders.java and >> its method: >> >> filteredQuery(QueryBuilder queryBuilder, @Nullable FilterBuilder >> filterBuilder) >> >> >> >> Please note that here FilterBuilder argument is nullable and QueryBuilder >> argument is not. Which means that eventually I have to write a query inside >> the Filtered part. If this correct, then how can I write a complete query >> with aggregations such that I don't want any score to be calculated and the >> response time is faster? >> >> Regards >> Piyush >> >> -- >> 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/d1bfad33-93d3-407a-8c0a-8184045f88ec%40googlegroups.com >> >> <https://groups.google.com/d/msgid/elasticsearch/d1bfad33-93d3-407a-8c0a-8184045f88ec%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> >> -- 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/c44055a5-1654-48fa-9787-503228e39de9%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
