[
https://issues.apache.org/jira/browse/LUCENE-7212?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15239109#comment-15239109
]
Karl Wright commented on LUCENE-7212:
-------------------------------------
I looked at ...
class LatLonPointDistanceComparator extends FieldComparator<Double> implements
LeafFieldComparator {
... briefly. This implementation is clearly not general at all for search
shape. But I think one could write a geo3d equivalent that would work for any
GeoDistance implementation with a provided DistanceStyle. This would also
serve to find objects within the implied Membership implementation, because the
contract for GeoDistance calls for it to return MAX_VALUE when the point is
outside the shape, so it would work beautifully.
The big problem is that there's not much performance gain possible because
there's currently no geo3d general means of going from a GeoDistance object and
distance measurement to a bounding XYZSolid. That is, there's no equivalent to
Rectangle.fromPointDistance(). Solving that is a harder problem and would
require extensions to all the shape objects that implement GeoDistance. But I
think that would clearly be step 2 anyway.
Geo3DPointDistanceComparator would be constructed, therefore, with a
GeoDistance object and a DistanceStyle object, and would call
GeoDistance.computeDistance() using these parameters when it needed to find a
distance. The decoding/encoding of XYZ values is most of the class.
> Add Geo3DPoint equivalents of LatLonPointDistanceComparator and
> LatLonPointSortField
> ------------------------------------------------------------------------------------
>
> Key: LUCENE-7212
> URL: https://issues.apache.org/jira/browse/LUCENE-7212
> Project: Lucene - Core
> Issue Type: Improvement
> Affects Versions: master
> Reporter: Karl Wright
> Assignee: Karl Wright
>
> Geo3D has a number of distance measurements and a generic way of computing
> interior distance. It would be great to take advantage of that for queries
> that return results ordered by interior distance.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]