You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Aleksey Yeschenko (JIRA)" <ji...@apache.org> on 2013/09/23 19:27:03 UTC

[jira] [Resolved] (CASSANDRA-5402) Add secondary indexes on multiple columns.

     [ https://issues.apache.org/jira/browse/CASSANDRA-5402?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Aleksey Yeschenko resolved CASSANDRA-5402.
------------------------------------------

    Resolution: Won't Fix

Now that we moved away from read-before-write for indexed writes, this is impossible.

Imagine an index on (a,b). Then an update or insert with a just one of them being updated, e.g. UPDATE foo SET a = 'a' WHERE ..

To write a new index entry, you need the current value of b, and the only way to get it is to perform read before write.

You could mandate UPDATE/INSERT to always include both if there is an index on them, but that only shifts the read-before-write work to the client.
                
> Add secondary indexes on multiple columns.
> ------------------------------------------
>
>                 Key: CASSANDRA-5402
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-5402
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Core
>            Reporter: Alejandro Rivero
>              Labels: features, newbie
>   Original Estimate: 336h
>  Remaining Estimate: 336h
>
> Using as index a CompositeType it seems that it should be possible to build a secondary index on two or more columns. (If it is already implemented, please consider this issue a documentation bug :-)
> A possible way to implement this  the old interface is to use the same index_name for all the involved columns, or perhaps a combination of index_name plus a suffix telling the position of each column in the corresponding  CompositeType of the index.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira