However, as noted in the comments on https://github.com/elastic/elasticsearch/pull/110253, these do not support all boolean combinations of predicates. In particular they do not support OR or NOT. We need to enhance the logic to consider these cases as well.
We've supported lucene pushdown for ST_DISTANCE in three PRs:
LessThan
andLessThanOrEquals
: https://github.com/elastic/elasticsearch/pull/110102GreaterThan
andGreaterThanOrEquals
: https://github.com/elastic/elasticsearch/pull/110253Equals
: https://github.com/elastic/elasticsearch/pull/110348However, as noted in the comments on https://github.com/elastic/elasticsearch/pull/110253, these do not support all boolean combinations of predicates. In particular they do not support
OR
orNOT
. We need to enhance the logic to consider these cases as well.