[ 
https://issues.apache.org/jira/browse/LUCENE-7656?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Adrien Grand updated LUCENE-7656:
---------------------------------
    Attachment: LUCENE-7656.patch

Here is a patch. I did not want the doc-values distance query to perform 
distance computations all the time so I ended up working on a way to split the 
bounding box around the distance circle into 4096 smaller boxes, and 
pre-computing how they relate to the distance query (I reused the logic that we 
already had in LatLonPointDistanceQuery for the inner nodes). I also switched 
LatLonPointDistanceQuery to it (for the leaf nodes that return 
Relation.CELL_CROSSES_QUERY), and interestingly it yielded a 8% speedup when 
tested with {{IndexAndSearchOpenStreetMaps}}.

I would appreciate if someone who is more comfortable with geo could review as 
maybe the way {{LatLonPointDistanceQuery}} computes relations between a box and 
a circle relies on assumptions that are not met in this new code?

> Implement geo box and distance queries using doc values.
> --------------------------------------------------------
>
>                 Key: LUCENE-7656
>                 URL: https://issues.apache.org/jira/browse/LUCENE-7656
>             Project: Lucene - Core
>          Issue Type: Improvement
>            Reporter: Adrien Grand
>            Priority: Minor
>         Attachments: LUCENE-7656.patch
>
>
> Having geo box and distance queries available as both point and 
> doc-values-based queries means we could use them with 
> {{IndexOrDocValuesQuery}}.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to