Class CollectionEntryIndex

All Implemented Interfaces:
Index

public class CollectionEntryIndex extends CollectionKeyIndexBase
Index on the element and value of cells participating in a collection. The row keys for this index are a composite of the collection element and value of indexed columns.
  • Constructor Details

  • Method Details

    • getIndexedValue

      public ByteBuffer getIndexedValue(ByteBuffer partitionKey, Clustering<?> clustering, CellPath path, ByteBuffer cellValue)
      Description copied from class: CassandraIndex
      Extract the value to be inserted into the index from the components of the base data
      Specified by:
      getIndexedValue in class CassandraIndex
      Parameters:
      partitionKey - from the primary data
      clustering - from the primary data
      path - from the primary data
      cellValue - from the primary data
      Returns:
      a ByteBuffer containing the value to be inserted in the index. This will be used to make the partition key in the index table
    • isStale

      public boolean isStale(Row data, ByteBuffer indexValue, long nowInSec)
      Description copied from class: CassandraIndex
      Check whether a value retrieved from an index is still valid by comparing it to current row from the base table. Used at read time to identify out of date index entries so that they can be excluded from search results and repaired
      Specified by:
      isStale in class CassandraIndex
      Parameters:
      data - the current row from the primary data table
      indexValue - the value we retrieved from the index
      Returns:
      true if the index is out of date and the entry should be dropped