Resolution: Won't Fix
Affects Version/s: 8.5.2
Fix Version/s: None
A few years ago the geospatial queries classes have been refactored to be package-private:
I get that there must be a reason for making use of package-private constructors in the geospatial query classes, but I'm wondering whether it would hurt to leave the classes still public.
Having the classes package-private means that they can't be used outside of the
This is the PR in which the refactoring was made:
In the elasticsearch code (specifically over the percolator functionality) I have noticed that when using polygon queries at the moment there isn't possible to do a reversed search on the search queries index.
This means that for all the geospatial queries are applied against the elasticsearch memory index in order to check for a percolation match.
If the percolator deals with
then it should probably suffice making use of the
for finding the search queries that have polygons containing the LatLonPoint of the location field of the document being percolated.
Increase the visibility of the LatLonXQuery classes to public so that they can
be used in other packages (e.g. elasticsearch percolator code).
NOTE that the constructors of the classes are still package-protected reason why the classes won't be able to be instantiated outside of their original package.
In the elasticsearch percolator code I'd have to make use explicitly of the LatLonPointInPolygonQuery class (instanceof) when analyzing the search queries to be used in the percolation process: