Interface DictionaryBasedInvertedIndexCreator

  • All Superinterfaces:
    AutoCloseable, Closeable, InvertedIndexCreator
    All Known Subinterfaces:
    CombinedInvertedIndexCreator

    public interface DictionaryBasedInvertedIndexCreator
    extends InvertedIndexCreator
    Support for RoaringBitmap inverted index:
     Layout for RoaringBitmap inverted index:
     |-------------------------------------------------------------------------|
     |                    Start offset of 1st bitmap                           |
     |    End offset of 1st bitmap (exclusive) / Start offset of 2nd bitmap    |
     |                                   ...                                   |
     | End offset of 2nd last bitmap (exclusive) / Start offset of last bitmap |
     |                  End offset of last bitmap (exclusive)                  |
     |-------------------------------------------------------------------------|
     |                           Data for 1st bitmap                           |
     |                           Data for 2nd bitmap                           |
     |                                   ...                                   |
     |                           Data for last bitmap                          |
     |-------------------------------------------------------------------------|
     

    To create an inverted index:

    • R Construct an instance of InvertedIndexCreator
    • Call add() for each docId in sequence starting with 0 to add dictId (dictIds for multi-valued column) into the creator
    • Call seal() after all dictIds have been added
    Support for Lucene based inverted index for text
    • Method Summary

      Modifier and Type Method Description
      void add​(int dictId)
      For single-value column, adds the dictionary id for the next document.
      void add​(int[] dictIds, int length)
      For multi-value column, adds the dictionary ids for the next document.
    • Method Detail

      • add

        void add​(int dictId)
        For single-value column, adds the dictionary id for the next document.
      • add

        void add​(int[] dictIds,
                 int length)
        For multi-value column, adds the dictionary ids for the next document.