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 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:
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.