[
https://issues.apache.org/jira/browse/LUCENE-7212?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15239365#comment-15239365
]
Robert Muir commented on LUCENE-7212:
-------------------------------------
How expensive are geo3d's distance formulas though?
The 2D distance comparator examines the least-competitive element of the
priority queue when it changes, to create a bounding box that can quickly
reject hits that won't compete anyway in a cheaper way than invoking haversin
distance.
In the worst case, this will happen for every document, so it has a guard in
the code to start doing it less often (only every Nth update) if it gets called
too many times.
The optimization helps for two reasons in 2D:
1. haversin distance computation is expensive
2. the bounding box check can be done in "encoded" integer space so it saves
any decoding costs.
For 3D the tradeoffs may be different.
> 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]