lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shai Erera (JIRA)" <>
Subject [jira] [Commented] (LUCENE-4609) Write a PackedIntsEncoder/Decoder for facets
Date Thu, 07 Feb 2013 16:25:13 GMT


Shai Erera commented on LUCENE-4609:

Few comments about the patch:

* instead of iterating from 0 to length and doing values.ints[values.offset + i], you can
compute 'upto' once and iterate from values.offset to upto?

* is {{if (v & 0xFF) == 0)}} better than {{if (v <= 256)}}? we could test of course

* I think that doing v - 256 is a good idea? You anyway do dgap, so what's another '-' (and
'+' in decoder)?

* Maybe add a test to EncodingTest? Just to be sure it passes the random testing?
> Write a PackedIntsEncoder/Decoder for facets
> --------------------------------------------
>                 Key: LUCENE-4609
>                 URL:
>             Project: Lucene - Core
>          Issue Type: New Feature
>          Components: modules/facet
>            Reporter: Shai Erera
>            Priority: Minor
>         Attachments: LUCENE-4609.patch, LUCENE-4609.patch, LUCENE-4609.patch, LUCENE-4609.patch,
LUCENE-4609.patch, SemiPackedEncoder.patch
> Today the facets API lets you write IntEncoder/Decoder to encode/decode the category
ordinals. We have several such encoders, including VInt (default), and block encoders.
> It would be interesting to implement and benchmark a PackedIntsEncoder/Decoder, with
potentially two variants: (1) receives bitsPerValue up front, when you e.g. know that you
have a small taxonomy and the max value you can see and (2) one that decides for each doc
on the optimal bitsPerValue, writes it as a header in the byte[] or something.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message