Bool and And filter, which is faster?

In this
article http://www.elasticsearch.org/blog/all-about-elasticsearch-filter-bitsets/,
it's saying bool is faster than add/or filters. But at that time it's
elasticsearch 0.9.
Is this still the truth?

Thanks!

--
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/69acf937-ea05-4bf0-b3a6-f469644f842d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Unfortunately, it depends on many factors, but basically elasticsearch 1.x
is going to have faster bool filter if your sub filters are dense and can
be efficiently loaded into bitsets (eg. range, term, terms filters), and
the and filter is going to be faster if your sub filters are sparse, or
if they need to be evaluated one-doc at a time (eg. geo or script filters).

We are not too happy with the fact that we can't make the right decisions
in elasticsearch itself, but this is hopefully something that will be
addressed in the next major version (there is already some progress towards
that direction in the master branch).

On Fri, Nov 21, 2014 at 1:46 AM, Fei Xie virgilxie@gmail.com wrote:

In this article
Elasticsearch Platform — Find real-time answers at scale | Elastic,
it's saying bool is faster than add/or filters. But at that time it's
elasticsearch 0.9.
Is this still the truth?

Thanks!

--
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/69acf937-ea05-4bf0-b3a6-f469644f842d%40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/69acf937-ea05-4bf0-b3a6-f469644f842d%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

--
Adrien Grand

--
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/CAL6Z4j4bnRfNEAZGoqdzbO9powfyYV6UmzDJthiG3spEVBpWMA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

1 Like

Thanks! Really appreciate your explanation.

On Friday, November 21, 2014 1:21:56 AM UTC-8, Adrien Grand wrote:

Unfortunately, it depends on many factors, but basically elasticsearch 1.x
is going to have faster bool filter if your sub filters are dense and can
be efficiently loaded into bitsets (eg. range, term, terms filters), and
the and filter is going to be faster if your sub filters are sparse, or
if they need to be evaluated one-doc at a time (eg. geo or script filters).

We are not too happy with the fact that we can't make the right decisions
in elasticsearch itself, but this is hopefully something that will be
addressed in the next major version (there is already some progress towards
that direction in the master branch).

On Fri, Nov 21, 2014 at 1:46 AM, Fei Xie <virg...@gmail.com <javascript:>>
wrote:

In this article
Elasticsearch Platform — Find real-time answers at scale | Elastic,
it's saying bool is faster than add/or filters. But at that time it's
elasticsearch 0.9.
Is this still the truth?

Thanks!

--
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 elasticsearc...@googlegroups.com <javascript:>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/69acf937-ea05-4bf0-b3a6-f469644f842d%40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/69acf937-ea05-4bf0-b3a6-f469644f842d%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout.

--
Adrien Grand

--
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/626bab4b-5f69-4d03-97ac-33b776338527%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.