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

ASF subversion and git services commented on LUCENE-5301:
---------------------------------------------------------

Commit 1541064 from [~jpountz] in branch 'dev/branches/branch_4x'
[ https://svn.apache.org/r1541064 ]

LUCENE-5301: Add a common interface to PackedInts data-structures, which 
extends NumericDocValues.

> All PackedInts APIs should share a common interface for random-access reads
> ---------------------------------------------------------------------------
>
>                 Key: LUCENE-5301
>                 URL: https://issues.apache.org/jira/browse/LUCENE-5301
>             Project: Lucene - Core
>          Issue Type: Improvement
>            Reporter: Adrien Grand
>            Assignee: Adrien Grand
>            Priority: Minor
>             Fix For: 4.6
>
>         Attachments: LUCENE-5301.patch, LUCENE-5301.patch
>
>
> It would be convenient if all PackedInts had a super-class with the {{long 
> get(long index)}} method. Maybe this super-class could even be 
> NumericDocValues so that doc values formats don't need to wrap eg. 
> BlockPackedReader into this kind of construct:
> {code}
>         final BlockPackedReader reader = new BlockPackedReader(data, 
> entry.packedIntsVersion, entry.blockSize, entry.count, true);
>         return new LongNumericDocValues() {
>           @Override
>           public long get(long id) {
>             return reader.get(id);
>           }
>         };
> {code}
> Instead, they could just
> {code}
>         return new BlockPackedReader(data, entry.packedIntsVersion, 
> entry.blockSize, entry.count, true);
> {code}



--
This message was sent by Atlassian JIRA
(v6.1#6144)

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

Reply via email to