[ 
https://issues.apache.org/jira/browse/LUCENE-8482?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16618121#comment-16618121
 ] 

Adrien Grand commented on LUCENE-8482:
--------------------------------------

bq. New patch where we approximate using a box query which removes the need of 
sampling too often and increase the performance.

Woohoo!

Given the positive effect of approximating using a box, I'm wondering what the 
performance is if we skip the byte[] comparisons in IntersectVisitor#visit() 
and all all doc IDs that are greater than the current doc ID?

Patch looks good overall. I agree that binary searching is easier than 
inverting the distance computation. I'm not sure it's right to use 
EARTH_MEAN_RADIUS_METERS as an initial distance though, should it rather be 
something like EARTH_MEAN_RADIUS_METERS * Math.PI?

bq. On the other hand, I was trying to develop a random test that compares the 
results from boosting and from sorting. This test sporadically fails because 
for points which are very close, distance is slightly different but the score 
is the same due to rounding errors.

I think that's expected. If we want to build such a test, maybe we could sort 
by a custom FieldComparator (SortField allows to do that) that computes the 
expected scores as a float? This way the accuracy loss would be the same on 
both sides?

> Boosting by geo distance
> ------------------------
>
>                 Key: LUCENE-8482
>                 URL: https://issues.apache.org/jira/browse/LUCENE-8482
>             Project: Lucene - Core
>          Issue Type: New Feature
>            Reporter: Adrien Grand
>            Priority: Minor
>         Attachments: LUCENE-8482.patch, LUCENE-8482.patch
>
>
> Similarly to LUCENE-8340 it would be nice to have an easy and efficient way 
> to fold geo distance into scoring formulas in order to boost by proximity.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to