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

Adrien Grand updated LUCENE-5767:
---------------------------------

    Attachment: LUCENE-5767.patch

Here is a new iteration that:
 - fixes the nocommit about ramBytesUsed
 - changes the API a bit in order to expose the global ordinal map per-segment, 
that is: {{LongValues getGlobalOrds(int segmentIndex)}} instead of {{long 
getGlobalOrd(int segmentIndex, long segmentOrd}}. It makes the API a bit easier 
to consume per-segment and also proved to be slightly faster in the context of 
Elasticsearch.

> OrdinalMap optimizations
> ------------------------
>
>                 Key: LUCENE-5767
>                 URL: https://issues.apache.org/jira/browse/LUCENE-5767
>             Project: Lucene - Core
>          Issue Type: Improvement
>            Reporter: Adrien Grand
>            Assignee: Adrien Grand
>            Priority: Minor
>             Fix For: 4.9, 5.0
>
>         Attachments: LUCENE-5767.patch, LUCENE-5767.patch
>
>
> OrdinalMap does its best to store a mapping from segment to global ordinals 
> with as little memory as possible using {{MonotonicAppendingLongBuffer}}. In 
> the low-cardinality case, there are things that could be optimized though:
>  - on large segments, it's quite likely that the segment ordinals will 
> perfectly match the global ordinals. In that case there is nothing to do, we 
> can just return the segment ordinal as-is.
>  - even if they don't, it might be that storing the global ordinals directly 
> in a PackedInts.Mutable only takes slightly more memory while removing the 
> overhead of the monotonic encoding.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

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

Reply via email to