Hi , Filters don't do scoring which means the constrains inside a filter is not used to determine the order of the results. But query does do scoring and determines the order in which results should be placed.
Thanks Vineeth On Wed, Dec 24, 2014 at 12:52 PM, Hajime <placeofnomemor...@gmail.com> wrote: > Can somebody explain that why this three filtered dsl > <http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-filtered-query.html> > queries > could potentially bring different result set? > > 1: one query: filtered -> query > { > "query":{ > "filtered":{ > "query":{ > "bool":{ > "must":[ > { > "match":{ > "body":"hello" > } > }, > { > "match":{ > "body":"world" > } > }, > { > "match":{ > "body":"test" > } > } > ] > } > } > }, > "filter":{ > > } > } > } > > 2: two queries: filtered->query,filtered->filter->query > { > "query":{ > "filtered":{ > "query":{ > "bool":{ > "must":[ > { > "match":{ > "body":"hello" > } > }, > { > "match":{ > "body":"world" > } > } > ] > } > } > }, > "filter":{ > "query":{ > "match":{ > "body":"test" > } > } > } > } > } > > 3:one query: filtered->filter->query > { > "query":{ > "filtered":{ > "filter":{ > "query":{ > "bool":{ > "must":[ > { > "match":{ > "body":"hello" > } > }, > { > "match":{ > "body":"world" > } > }, > { > "match":{ > "body":"test" > } > }, > ] > } > } > }, > } > } > } > > thanks, > > Hajime > > -- > 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+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/elasticsearch/CAHm3Zsozec30sOVHDy944acCXxZLJvkbeCyXiReYbXxFR5izHA%40mail.gmail.com > <https://groups.google.com/d/msgid/elasticsearch/CAHm3Zsozec30sOVHDy944acCXxZLJvkbeCyXiReYbXxFR5izHA%40mail.gmail.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 elasticsearch+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAGdPd5k9z53d5f%2Bezm9j%3D2fZBLtvFf2XvMj9fZF2mPUqHBqJaQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.