Skip to content

SASI index doesn't work with composite partition key #8

Description

@makailol

Hello,

We have a table with primary key : PRIMARY KEY ((user_id, app_id), id)

To query all records of user_id, we tried SASI index as below.
CREATE CUSTOM INDEX master_userid_sparse ON mykeyspace.master (user_id) USING 'org.apache.cassandra.index.sasi.SASIIndex' WITH OPTIONS = {'mode': 'SPARSE'};

Now when we execute query with "WHERE user_id = ?" it returns blank result(zero rows and no error).

If we use native secondary index, it works fine for above query (referenced from below link) but native index (applied on user_id) doesn't work with SASI indexes (applied on other columns).
https://docs.datastax.com/en/cql/3.3/cql/cql_using/useSecondaryIndex.html

Is this SASI behaviour by design or does it address any bug?

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions