[ 
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 an updated patch that should address your comments:
 - It still uses shifting, but there are no lost cells anymore. As a 
side-effect, this also means we do not compute geo distances for those lost 
cells at initialization time so it initialization might have got a bit faster.
 - I wanted to look into initializing the distance predicate lazily but 
remembered that {{IndexSearcher}} might call {{Weight.scorer}} from multiple 
threads so this has some complexity that I'd like to delay to another issue. I 
did more benchmarking to check how much of an issue that is, and initialization 
constantly runs in less than half a millisecond on my machine, so it is not 
that annoying to do it twice I think.
 - I moved the distance predicate from Query to Weight. It has some memory 
footprint, so it is better if queries do not hold a reference to it (eg. if 
they are used as cache keys).
 - I replaced the {{Relation[]}} array with a {{byte[]}} that stores ordinals 
of the enum constants. This looked like a safe win as this 4x smaller array 
could be more friendly with the cpu cache.

> 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, LUCENE-7656.patch, 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