Filtered dsl return different results for num of "query"

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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAHm3Zsozec30sOVHDy944acCXxZLJvkbeCyXiReYbXxFR5izHA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

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 placeofnomemories@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+unsubscribe@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+unsubscribe@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.

Hi Vineeth,

Thanks.
So the order of results could be different but the whole result should be
same?
By the way, I try every strategy mention in here, but the above three
queries give different results anyway.

On Wed, Dec 24, 2014 at 9:34 PM, vineeth mohan vm.vineethmohan@gmail.com
wrote:

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 placeofnomemories@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+unsubscribe@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+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/CAGdPd5k9z53d5f%2Bezm9j%3D2fZBLtvFf2XvMj9fZF2mPUqHBqJaQ%40mail.gmail.com
https://groups.google.com/d/msgid/elasticsearch/CAGdPd5k9z53d5f%2Bezm9j%3D2fZBLtvFf2XvMj9fZF2mPUqHBqJaQ%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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAHm3Zso6LJGmC0SVyLns8iZX3TKXvPv4sdF%2B0nAUxjCtmt3PiA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Hi ,

Yes , the number of documents matched should be the same.
Can you confirm this ?

Thanks
Vineeth

On Thu, Dec 25, 2014 at 7:25 AM, Hajime placeofnomemories@gmail.com wrote:

Hi Vineeth,

Thanks.
So the order of results could be different but the whole result should be
same?
By the way, I try every strategy mention in here, but the above three
queries give different results anyway.

Elasticsearch Platform — Find real-time answers at scale | Elastic

On Wed, Dec 24, 2014 at 9:34 PM, vineeth mohan vm.vineethmohan@gmail.com
wrote:

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 placeofnomemories@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+unsubscribe@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+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/CAGdPd5k9z53d5f%2Bezm9j%3D2fZBLtvFf2XvMj9fZF2mPUqHBqJaQ%40mail.gmail.com
https://groups.google.com/d/msgid/elasticsearch/CAGdPd5k9z53d5f%2Bezm9j%3D2fZBLtvFf2XvMj9fZF2mPUqHBqJaQ%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+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/CAHm3Zso6LJGmC0SVyLns8iZX3TKXvPv4sdF%2B0nAUxjCtmt3PiA%40mail.gmail.com
https://groups.google.com/d/msgid/elasticsearch/CAHm3Zso6LJGmC0SVyLns8iZX3TKXvPv4sdF%2B0nAUxjCtmt3PiA%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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CAGdPd5%3DMbdxa8qJSukEuh%2BOD2_XF0imO6r-GnsX8mnETxs6YNg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.