Interface MutableForwardIndex

    • Method Summary

      Modifier and Type Method Description
      default BigDecimal getBigDecimal​(int docId)
      Reads the BIG_DECIMAL type single-value at the given document id.
      default BigDecimal getBigDecimal​(int docId, ForwardIndexReaderContext context)
      Reads the BIG_DECIMAL type single-value at the given document id.
      default byte[] getBytes​(int docId)
      Reads the BYTES type single-value at the given document id.
      default byte[] getBytes​(int docId, ForwardIndexReaderContext context)
      Reads the BYTES type single-value at the given document id.
      default byte[][] getBytesMV​(int docId)
      Reads the BYTES type multi-value at the given document id into a buffer and returns the buffer.
      default int getBytesMV​(int docId, byte[][] valueBuffer)
      Reads the BYTES type multi-value at the given document id into the passed in value buffer (the buffer size must be enough to hold all the values for the multi-value entry) and returns the number of values within the multi-value entry.
      default int getBytesMV​(int docId, byte[][] valueBuffer, ForwardIndexReaderContext context)
      Reads the bytes type multi-value at the given document id into the passed in value buffer (the buffer size must be enough to hold all the values for the multi-value entry) and returns the number of values within the multi-value entry.
      default byte[][] getBytesMV​(int docId, ForwardIndexReaderContext context)
      Reads the bytes type multi-value at the given document id.
      default int getDictId​(int docId)
      Reads the dictionary id for a single-value column at the given document id.
      default int getDictId​(int docId, ForwardIndexReaderContext context)
      Reads the dictionary id for a single-value column at the given document id.
      default int[] getDictIdMV​(int docId)
      Reads the dictionary ids for a multi-value column at the given document id into a buffer and returns the buffer.
      default int getDictIdMV​(int docId, int[] dictIdBuffer)
      Reads the dictionary ids for a multi-value column at the given document id into the passed in buffer (the buffer size must be enough to hold all the values for the multi-value entry) and returns the number of values within the multi-value entry.
      default int getDictIdMV​(int docId, int[] dictIdBuffer, ForwardIndexReaderContext context)
      Reads the dictionary ids for a multi-value column at the given document id into the passed in buffer (the buffer size must be enough to hold all the values for the multi-value entry) and returns the number of values within the multi-value entry.
      default int[] getDictIdMV​(int docId, ForwardIndexReaderContext context)
      Reads the dictionary ids for a multi-value column at the given document id.
      default double getDouble​(int docId)
      Reads the DOUBLE type single-value at the given document id.
      default double getDouble​(int docId, ForwardIndexReaderContext context)
      Reads the DOUBLE type single-value at the given document id.
      default double[] getDoubleMV​(int docId)
      Reads the DOUBLE type multi-value at the given document id into a buffer and returns the buffer.
      default int getDoubleMV​(int docId, double[] valueBuffer)
      Reads the DOUBLE type multi-value at the given document id into the passed in value buffer (the buffer size must be enough to hold all the values for the multi-value entry) and returns the number of values within the multi-value entry.
      default int getDoubleMV​(int docId, double[] valueBuffer, ForwardIndexReaderContext context)
      Reads the DOUBLE type multi-value at the given document id into the passed in value buffer (the buffer size must be enough to hold all the values for the multi-value entry) and returns the number of values within the multi-value entry.
      default double[] getDoubleMV​(int docId, ForwardIndexReaderContext context)
      Reads the DOUBLE type multi-value at the given document id.
      default float getFloat​(int docId)
      Reads the FLOAT type single-value at the given document id.
      default float getFloat​(int docId, ForwardIndexReaderContext context)
      Reads the FLOAT type single-value at the given document id.
      default float[] getFloatMV​(int docId)
      Reads the FLOAT type multi-value at the given document id into a buffer and returns the buffer.
      default int getFloatMV​(int docId, float[] valueBuffer)
      Reads the FLOAT type multi-value at the given document id into the passed in value buffer (the buffer size must be enough to hold all the values for the multi-value entry) and returns the number of values within the multi-value entry.
      default int getFloatMV​(int docId, float[] valueBuffer, ForwardIndexReaderContext context)
      Reads the FLOAT type multi-value at the given document id into the passed in value buffer (the buffer size must be enough to hold all the values for the multi-value entry) and returns the number of values within the multi-value entry.
      default float[] getFloatMV​(int docId, ForwardIndexReaderContext context)
      Reads the FLOAT type multi-value at the given document id.
      default int getInt​(int docId)
      Reads the INT value at the given document id.
      default int getInt​(int docId, ForwardIndexReaderContext context)
      Reads the INT value at the given document id.
      default int[] getIntMV​(int docId)
      Reads the INT type multi-value at the given document id into a buffer and returns the buffer.
      default int getIntMV​(int docId, int[] valueBuffer)
      Reads the INT type multi-value at the given document id into the passed in value buffer (the buffer size must be enough to hold all the values for the multi-value entry) and returns the number of values within the multi-value entry.
      default int getIntMV​(int docId, int[] valueBuffer, ForwardIndexReaderContext context)
      Reads the INT type multi-value at the given document id into the passed in value buffer (the buffer size must be enough to hold all the values for the multi-value entry) and returns the number of values within the multi-value entry.
      default int[] getIntMV​(int docId, ForwardIndexReaderContext context)
      Reads the INT type multi-value at the given document id.
      int getLengthOfLongestElement()
      Returns the length (size in bytes) of the longest elements inside the forward index.
      int getLengthOfShortestElement()
      Returns the length (size in bytes) of the shortest elements inside the forward index.
      default long getLong​(int docId)
      Reads the LONG type single-value at the given document id.
      default long getLong​(int docId, ForwardIndexReaderContext context)
      Reads the LONG type single-value at the given document id.
      default long[] getLongMV​(int docId)
      Reads the LONG type multi-value at the given document id into a buffer and returns the buffer.
      default int getLongMV​(int docId, long[] valueBuffer)
      Reads the LONG type multi-value at the given document id into the passed in value buffer (the buffer size must be enough to hold all the values for the multi-value entry) and returns the number of values within the multi-value entry.
      default int getLongMV​(int docId, long[] valueBuffer, ForwardIndexReaderContext context)
      Reads the LONG type multi-value at the given document id into the passed in value buffer (the buffer size must be enough to hold all the values for the multi-value entry) and returns the number of values within the multi-value entry.
      default long[] getLongMV​(int docId, ForwardIndexReaderContext context)
      Reads the LONG type multi-value at the given document id.
      default int getNumValuesMV​(int docId)
      Gets the number of multi-values at a given document id and returns it.
      default int getNumValuesMV​(int docId, ForwardIndexReaderContext context)
      Gets the number of multi-values at a given document id and returns it.
      default String getString​(int docId)
      Reads the STRING type single-value at the given document id.
      default String getString​(int docId, ForwardIndexReaderContext context)
      Reads the STRING type single-value at the given document id.
      default String[] getStringMV​(int docId)
      Reads the STRING type multi-value at the given document id into a buffer and returns the buffer.
      default int getStringMV​(int docId, String[] valueBuffer)
      Reads the STRING type multi-value at the given document id into the passed in value buffer (the buffer size must be enough to hold all the values for the multi-value entry) and returns the number of values within the multi-value entry.
      default int getStringMV​(int docId, String[] valueBuffer, ForwardIndexReaderContext context)
      Reads the STRING type multi-value at the given document id into the passed in value buffer (the buffer size must be enough to hold all the values for the multi-value entry) and returns the number of values within the multi-value entry.
      default String[] getStringMV​(int docId, ForwardIndexReaderContext context)
      Reads the STRING type multi-value at the given document id.
      default void readDictIds​(int[] docIds, int length, int[] dictIdBuffer)
      Batch reads multiple dictionary ids for a single-value column at the given document ids into the passed in buffer (the buffer size must be larger than or equal to the length).
      default void readDictIds​(int[] docIds, int length, int[] dictIdBuffer, ForwardIndexReaderContext context)
      Batch reads multiple dictionary ids for a single-value column at the given document ids into the passed in buffer (the buffer size must be larger than or equal to the length).
      default void setBigDecimal​(int docId, BigDecimal value)
      Writes the BIG_DECIMAL type single-value into the given document id.
      default void setBytes​(int docId, byte[] value)
      Writes the BYTES type single-value into the given document id.
      default void setBytesMV​(int docId, byte[][] values)
      Writes the BYTES type multi-value into the given document id.
      default void setDictId​(int docId, int dictId)
      Writes the dictionary id for a single-value column into the given document id.
      default void setDictIdMV​(int docId, int[] dictIds)
      Writes the dictionary ids for a multi-value column into the given document id.
      default void setDouble​(int docId, double value)
      Writes the DOUBLE type single-value into the given document id.
      default void setDoubleMV​(int docId, double[] values)
      Writes the DOUBLE type multi-value into the given document id.
      default void setFloat​(int docId, float value)
      Writes the FLOAT type single-value into the given document id.
      default void setFloatMV​(int docId, float[] values)
      Writes the FLOAT type multi-value into the given document id.
      default void setInt​(int docId, int value)
      Writes the INT type single-value into the given document id.
      default void setIntMV​(int docId, int[] values)
      Writes the INT type multi-value into the given document id.
      default void setLong​(int docId, long value)
      Writes the LONG type single-value into the given document id.
      default void setLongMV​(int docId, long[] values)
      Writes the LONG type multi-value into the given document id.
      default void setString​(int docId, String value)
      Writes the STRING type single-value into the given document id.
      default void setStringMV​(int docId, String[] values)
      Writes the STRING type multi-value into the given document id.
    • Method Detail

      • getLengthOfShortestElement

        int getLengthOfShortestElement()
        Returns the length (size in bytes) of the shortest elements inside the forward index.
        Returns:
        The length (size in bytes) of the shortest elements inside the forward index.
      • getLengthOfLongestElement

        int getLengthOfLongestElement()
        Returns the length (size in bytes) of the longest elements inside the forward index.
        Returns:
        The length (size in bytes) of the longest elements inside the forward index.
      • getDictId

        default int getDictId​(int docId)
        Reads the dictionary id for a single-value column at the given document id.
        Parameters:
        docId - Document id
        Returns:
        Dictionary id at the given document id
      • readDictIds

        default void readDictIds​(int[] docIds,
                                 int length,
                                 int[] dictIdBuffer)
        Batch reads multiple dictionary ids for a single-value column at the given document ids into the passed in buffer (the buffer size must be larger than or equal to the length).
        Parameters:
        docIds - Array containing the document ids to read
        length - Number of values to read
        dictIdBuffer - Dictionary id buffer
      • readDictIds

        default void readDictIds​(int[] docIds,
                                 int length,
                                 int[] dictIdBuffer,
                                 ForwardIndexReaderContext context)
        Description copied from interface: ForwardIndexReader
        Batch reads multiple dictionary ids for a single-value column at the given document ids into the passed in buffer (the buffer size must be larger than or equal to the length).
        Specified by:
        readDictIds in interface ForwardIndexReader<ForwardIndexReaderContext>
        Parameters:
        docIds - Array containing the document ids to read
        length - Number of values to read
        dictIdBuffer - Dictionary id buffer
        context - Reader context
      • getDictIdMV

        default int getDictIdMV​(int docId,
                                int[] dictIdBuffer)
        Reads the dictionary ids for a multi-value column at the given document id into the passed in buffer (the buffer size must be enough to hold all the values for the multi-value entry) and returns the number of values within the multi-value entry.
        Parameters:
        docId - Document id
        dictIdBuffer - Dictionary id buffer
        Returns:
        Number of values within the multi-value entry
      • getDictIdMV

        default int[] getDictIdMV​(int docId)
        Reads the dictionary ids for a multi-value column at the given document id into a buffer and returns the buffer.
        Parameters:
        docId - Document id
        Returns:
        A buffer containing the multi-value entries
      • getDictIdMV

        default int getDictIdMV​(int docId,
                                int[] dictIdBuffer,
                                ForwardIndexReaderContext context)
        Description copied from interface: ForwardIndexReader
        Reads the dictionary ids for a multi-value column at the given document id into the passed in buffer (the buffer size must be enough to hold all the values for the multi-value entry) and returns the number of values within the multi-value entry.
        Specified by:
        getDictIdMV in interface ForwardIndexReader<ForwardIndexReaderContext>
        Parameters:
        docId - Document id
        dictIdBuffer - Dictionary id buffer
        context - Reader context
        Returns:
        Number of values within the multi-value entry
      • setDictId

        default void setDictId​(int docId,
                               int dictId)
        Writes the dictionary id for a single-value column into the given document id.
        Parameters:
        docId - Document id
        dictId - Dictionary id to write
      • setDictIdMV

        default void setDictIdMV​(int docId,
                                 int[] dictIds)
        Writes the dictionary ids for a multi-value column into the given document id.
        Parameters:
        docId - Document id
        dictIds - Dictionary ids to write
      • getInt

        default int getInt​(int docId)
        Reads the INT value at the given document id. The passed in reader context can be used to accelerate the reads.

        NOTE: Dictionary id is handled as INT type.

        Parameters:
        docId - Document id
        Returns:
        INT type single-value at the given document id
      • getLong

        default long getLong​(int docId)
        Reads the LONG type single-value at the given document id. The passed in reader context can be used to accelerate the reads.
        Parameters:
        docId - Document id
        Returns:
        LONG type single-value at the given document id
      • getFloat

        default float getFloat​(int docId)
        Reads the FLOAT type single-value at the given document id. The passed in reader context can be used to accelerate the reads.
        Parameters:
        docId - Document id
        Returns:
        FLOAT type single-value at the given document id
      • getDouble

        default double getDouble​(int docId)
        Reads the DOUBLE type single-value at the given document id. The passed in reader context can be used to accelerate the reads.
        Parameters:
        docId - Document id
        Returns:
        DOUBLE type single-value at the given document id
      • getBigDecimal

        default BigDecimal getBigDecimal​(int docId)
        Reads the BIG_DECIMAL type single-value at the given document id. The passed in reader context can be used to accelerate the reads.
        Parameters:
        docId - Document id
        Returns:
        BIG_DECIMAL type single-value at the given document id
      • getString

        default String getString​(int docId)
        Reads the STRING type single-value at the given document id. The passed in reader context can be used to accelerate the reads.
        Parameters:
        docId - Document id
        Returns:
        STRING type single-value at the given document id
      • getBytes

        default byte[] getBytes​(int docId)
        Reads the BYTES type single-value at the given document id. The passed in reader context can be used to accelerate the reads.
        Parameters:
        docId - Document id
        Returns:
        BYTES type single-value at the given document id
      • setInt

        default void setInt​(int docId,
                            int value)
        Writes the INT type single-value into the given document id.
        Parameters:
        docId - Document id
        value - Value to write
      • setLong

        default void setLong​(int docId,
                             long value)
        Writes the LONG type single-value into the given document id.
        Parameters:
        docId - Document id
        value - Value to write
      • setFloat

        default void setFloat​(int docId,
                              float value)
        Writes the FLOAT type single-value into the given document id.
        Parameters:
        docId - Document id
        value - Value to write
      • setDouble

        default void setDouble​(int docId,
                               double value)
        Writes the DOUBLE type single-value into the given document id.
        Parameters:
        docId - Document id
        value - Value to write
      • setBigDecimal

        default void setBigDecimal​(int docId,
                                   BigDecimal value)
        Writes the BIG_DECIMAL type single-value into the given document id.
        Parameters:
        docId - Document id
        value - Value to write
      • setString

        default void setString​(int docId,
                               String value)
        Writes the STRING type single-value into the given document id.
        Parameters:
        docId - Document id
        value - Value to write
      • setBytes

        default void setBytes​(int docId,
                              byte[] value)
        Writes the BYTES type single-value into the given document id.
        Parameters:
        docId - Document id
        value - Value to write
      • getIntMV

        default int getIntMV​(int docId,
                             int[] valueBuffer)
        Reads the INT type multi-value at the given document id into the passed in value buffer (the buffer size must be enough to hold all the values for the multi-value entry) and returns the number of values within the multi-value entry.
        Parameters:
        docId - Document id
        valueBuffer - Value buffer
        Returns:
        Number of values within the multi-value entry
      • getIntMV

        default int[] getIntMV​(int docId)
        Reads the INT type multi-value at the given document id into a buffer and returns the buffer.
        Parameters:
        docId - Document id
        Returns:
        A buffer containing the multi-value entries
      • getIntMV

        default int getIntMV​(int docId,
                             int[] valueBuffer,
                             ForwardIndexReaderContext context)
        Description copied from interface: ForwardIndexReader
        Reads the INT type multi-value at the given document id into the passed in value buffer (the buffer size must be enough to hold all the values for the multi-value entry) and returns the number of values within the multi-value entry.
        Specified by:
        getIntMV in interface ForwardIndexReader<ForwardIndexReaderContext>
        Parameters:
        docId - Document id
        valueBuffer - Value buffer
        context - Reader context
        Returns:
        Number of values within the multi-value entry
      • getLongMV

        default int getLongMV​(int docId,
                              long[] valueBuffer)
        Reads the LONG type multi-value at the given document id into the passed in value buffer (the buffer size must be enough to hold all the values for the multi-value entry) and returns the number of values within the multi-value entry.
        Parameters:
        docId - Document id
        valueBuffer - Value buffer
        Returns:
        Number of values within the multi-value entry
      • getLongMV

        default long[] getLongMV​(int docId)
        Reads the LONG type multi-value at the given document id into a buffer and returns the buffer.
        Parameters:
        docId - Document id
        Returns:
        A buffer containing the multi-value entries
      • getLongMV

        default int getLongMV​(int docId,
                              long[] valueBuffer,
                              ForwardIndexReaderContext context)
        Description copied from interface: ForwardIndexReader
        Reads the LONG type multi-value at the given document id into the passed in value buffer (the buffer size must be enough to hold all the values for the multi-value entry) and returns the number of values within the multi-value entry.
        Specified by:
        getLongMV in interface ForwardIndexReader<ForwardIndexReaderContext>
        Parameters:
        docId - Document id
        valueBuffer - Value buffer
        context - Reader context
        Returns:
        Number of values within the multi-value entry
      • getFloatMV

        default int getFloatMV​(int docId,
                               float[] valueBuffer)
        Reads the FLOAT type multi-value at the given document id into the passed in value buffer (the buffer size must be enough to hold all the values for the multi-value entry) and returns the number of values within the multi-value entry.
        Parameters:
        docId - Document id
        valueBuffer - Value buffer
        Returns:
        Number of values within the multi-value entry
      • getFloatMV

        default float[] getFloatMV​(int docId)
        Reads the FLOAT type multi-value at the given document id into a buffer and returns the buffer.
        Parameters:
        docId - Document id
        Returns:
        A buffer containing the multi-value entries
      • getFloatMV

        default int getFloatMV​(int docId,
                               float[] valueBuffer,
                               ForwardIndexReaderContext context)
        Description copied from interface: ForwardIndexReader
        Reads the FLOAT type multi-value at the given document id into the passed in value buffer (the buffer size must be enough to hold all the values for the multi-value entry) and returns the number of values within the multi-value entry.
        Specified by:
        getFloatMV in interface ForwardIndexReader<ForwardIndexReaderContext>
        Parameters:
        docId - Document id
        valueBuffer - Value buffer
        context - Reader context
        Returns:
        Number of values within the multi-value entry
      • getDoubleMV

        default int getDoubleMV​(int docId,
                                double[] valueBuffer)
        Reads the DOUBLE type multi-value at the given document id into the passed in value buffer (the buffer size must be enough to hold all the values for the multi-value entry) and returns the number of values within the multi-value entry.
        Parameters:
        docId - Document id
        valueBuffer - Value buffer
        Returns:
        Number of values within the multi-value entry
      • getDoubleMV

        default double[] getDoubleMV​(int docId)
        Reads the DOUBLE type multi-value at the given document id into a buffer and returns the buffer.
        Parameters:
        docId - Document id
        Returns:
        A buffer containing the multi-value entries
      • getDoubleMV

        default int getDoubleMV​(int docId,
                                double[] valueBuffer,
                                ForwardIndexReaderContext context)
        Description copied from interface: ForwardIndexReader
        Reads the DOUBLE type multi-value at the given document id into the passed in value buffer (the buffer size must be enough to hold all the values for the multi-value entry) and returns the number of values within the multi-value entry.
        Specified by:
        getDoubleMV in interface ForwardIndexReader<ForwardIndexReaderContext>
        Parameters:
        docId - Document id
        valueBuffer - Value buffer
        context - Reader context
        Returns:
        Number of values within the multi-value entry
      • getStringMV

        default int getStringMV​(int docId,
                                String[] valueBuffer)
        Reads the STRING type multi-value at the given document id into the passed in value buffer (the buffer size must be enough to hold all the values for the multi-value entry) and returns the number of values within the multi-value entry.
        Parameters:
        docId - Document id
        valueBuffer - Value buffer
        Returns:
        Number of values within the multi-value entry
      • getStringMV

        default String[] getStringMV​(int docId)
        Reads the STRING type multi-value at the given document id into a buffer and returns the buffer.
        Parameters:
        docId - Document id
        Returns:
        A buffer containing the multi-value entries
      • getStringMV

        default int getStringMV​(int docId,
                                String[] valueBuffer,
                                ForwardIndexReaderContext context)
        Description copied from interface: ForwardIndexReader
        Reads the STRING type multi-value at the given document id into the passed in value buffer (the buffer size must be enough to hold all the values for the multi-value entry) and returns the number of values within the multi-value entry.
        Specified by:
        getStringMV in interface ForwardIndexReader<ForwardIndexReaderContext>
        Parameters:
        docId - Document id
        valueBuffer - Value buffer
        context - Reader context
        Returns:
        Number of values within the multi-value entry
      • getBytesMV

        default int getBytesMV​(int docId,
                               byte[][] valueBuffer)
        Reads the BYTES type multi-value at the given document id into the passed in value buffer (the buffer size must be enough to hold all the values for the multi-value entry) and returns the number of values within the multi-value entry.
        Parameters:
        docId - Document id
        valueBuffer - Value buffer
        Returns:
        Number of values within the multi-value entry
      • getBytesMV

        default byte[][] getBytesMV​(int docId)
        Reads the BYTES type multi-value at the given document id into a buffer and returns the buffer.
        Parameters:
        docId - Document id
        Returns:
        A buffer containing the multi-value entries
      • getBytesMV

        default int getBytesMV​(int docId,
                               byte[][] valueBuffer,
                               ForwardIndexReaderContext context)
        Description copied from interface: ForwardIndexReader
        Reads the bytes type multi-value at the given document id into the passed in value buffer (the buffer size must be enough to hold all the values for the multi-value entry) and returns the number of values within the multi-value entry.
        Specified by:
        getBytesMV in interface ForwardIndexReader<ForwardIndexReaderContext>
        Parameters:
        docId - Document id
        valueBuffer - Value buffer
        context - Reader context
        Returns:
        Number of values within the multi-value entry
      • getNumValuesMV

        default int getNumValuesMV​(int docId)
        Gets the number of multi-values at a given document id and returns it.
        Parameters:
        docId - Document id
        Returns:
        Number of values within the multi-value entry
      • setIntMV

        default void setIntMV​(int docId,
                              int[] values)
        Writes the INT type multi-value into the given document id.
        Parameters:
        docId - Document id
        values - Values to write
      • setLongMV

        default void setLongMV​(int docId,
                               long[] values)
        Writes the LONG type multi-value into the given document id.
        Parameters:
        docId - Document id
        values - Values to write
      • setFloatMV

        default void setFloatMV​(int docId,
                                float[] values)
        Writes the FLOAT type multi-value into the given document id.
        Parameters:
        docId - Document id
        values - Values to write
      • setDoubleMV

        default void setDoubleMV​(int docId,
                                 double[] values)
        Writes the DOUBLE type multi-value into the given document id.
        Parameters:
        docId - Document id
        values - Values to write
      • setStringMV

        default void setStringMV​(int docId,
                                 String[] values)
        Writes the STRING type multi-value into the given document id.
        Parameters:
        docId - Document id
        values - Values to write
      • setBytesMV

        default void setBytesMV​(int docId,
                                byte[][] values)
        Writes the BYTES type multi-value into the given document id.
        Parameters:
        docId - Document id
        values - Values to write