Elias-fano Coding algorithm--inverted index compression is essentially the idea of bucket sort data structure

Source: Internet
Author: User

The Elias-fano encoding process is as follows: the lowest l bits of a set of integers are concatenated together, and the high positions are divided into buckets in a strictly monotonically increasing order.

Example:2, 3, 5, 7, 11, 13, 24


Count in unary the size of upper bits "buckets" including empty ones:110= calculates the largest bucket, here is 110, calculated as follows:
Maximum bucket: [U/2^l]
Example: [24/2^2] = 6 = 110

Connection Lowest bit:

Concatenate lower bits
10110111110100

The final code is as follows:

Elias-fano representation of the sequence
11011010100010 10110111110100

Explain why this is the result?

000 of the barrels are 2 numbers (10,11), 2 of the unary codes are 110

001 of the Barrels are 2 numbers (01,11), 2 of the unary codes are 110

010 of the barrels are 1 numbers (11), 1 of the unary encoding is 10

011 of the barrels are 1 numbers (01), 1 of the unary encoding is 10

100 of the barrels are 0 numbers, and 0 of the unary encoding is 0

101 of the barrels are 0 numbers, and 0 of the unary encoding is 0

110 of the barrels are 1 numbers (00), 1 of the unary encoding is 10

Connecting the above code is: 11011010100010

Last connection Low code: 10110111110100

Together, the final code is: 11011010100010 10110111110100

The sequence in the figure is 2,3,5,7,11,13,24, if you want to locate a position greater than 6, then the 6/2^2 can be positioned to a bucket greater than 6, and then a linear scan within the bucket. It can be seen that the presence of low L-bit, is the use of the bucket positioning, so as to avoid all decompression, which can be analogous to the regular index of the jumping table, jumping interval of 2^l.

The QUASI-SUCCINCT index has been applied in Mg4j's open source search engine.

Upgraded Elias-fano encoding algorithm: partitioned (partition block) Elias-fano encoding, this article is the best paper for the 2014 Sigir conference, which is an improvement on Elias-fano coding. Still by the author of Quasi-succinct, the main solution to the compression rate of the QUASI-SUCCINCT index-the regression block compression method, the number sequence is divided into chunks, each chunk is encoded separately with Elias-fano, and in order to ensure that there are still random access characteristics, The chunk boundary numbers are again Elias-fano encoded separately, thus forming a level two structure. According to the author's experiment, the partition Elias-fano coding is more than the fastest Pfordelta encoding optpfor speed and compression rate, but the compression ratio is much higher than the latter (twice times more). Therefore, in the random access, compression rate, decompression performance to achieve a strong comprehensive ability, awarded the best paper deserved.

Reference:

Http://www.di.unipi.it/~ottavian/files/elias_fano_sigir14.pdf

www.di.unipi.it/~ottavian/files/partitioned_elias_fano_sigir14.pptx

Elias-fano Coding algorithm--inverted index compression is essentially the idea of bucket sort data structure

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.