-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: 3.10.2
-
Component/s: Builders, Query Operations
-
None
-
Minor Change
As discussed in DOCS-12834, a query with the $geoWithin operator cannot contain $not next to it.
The following example is invalid:
{"coordinates": {"$geoWithin": {"$centerSphere": [[22.0, 52.0], 0.04]}, "$not": {"$geoWithin": {"$centerSphere": [[22.0, 52.0], 0.01]}}}}
Unfortunately the implementation of `AndFilter` optimizes the following snippet to the query above:
Filters.and( Filters.geoWithinCenterSphere("coordinates", 22, 52, 0.04), Filters.not( Filters.geoWithinCenterSphere("coordinates", 22, 52, 0.01), ) )
- is related to
-
COMPASS-4475 Aggregation tool generating Java code that causes runtime errors
- Closed
-
JAVA-4006 Filters can produce invalid query shapes in Java 4.0+
- Closed