[ 
https://issues.apache.org/jira/browse/CASSANDRA-2231?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13001752#comment-13001752
 ] 

Ed Anuff commented on CASSANDRA-2231:
-------------------------------------

bq.Why? How many indexes are you creating?

Do you mean how many indexes or how many index types?  Lots of relatively small 
indexes, one index potentially for every relationship, but I'm not sure that's 
what you meant.  In terms of index types, without a dynamic capability, then if 
I want to create an index on integer values, that's one CF, if I want to create 
an index on string values, that's another CF, if I want to create an index 
sorted first by lastname, then by firstname, that's another CF.  I tried that 
approach and it made for some fairly convoluted code, but more concerning, I 
had close to 20 CFs, since maintaining a CF index requires at least one other 
CFs to store related metadata.  I was able to consolidate that down to about 4 
CFs, much more manageable code and Cassandra became a much happier camper.

> Add CompositeType comparer to the comparers provided in 
> org.apache.cassandra.db.marshal
> ---------------------------------------------------------------------------------------
>
>                 Key: CASSANDRA-2231
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2231
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Contrib
>    Affects Versions: 0.7.3
>            Reporter: Ed Anuff
>            Priority: Minor
>         Attachments: 0001-Add-compositeType.patch, 
> edanuff-CassandraCompositeType-1e253c4.zip
>
>
> CompositeType is a custom comparer that makes it possible to create 
> comparable composite values out of the basic types that Cassandra currently 
> supports, such as Long, UUID, etc.  This is very useful in both the creation 
> of custom inverted indexes using columns in a skinny row, where each column 
> name is a composite value, and also when using Cassandra's built-in secondary 
> index support, where it can be used to encode the values in the columns that 
> Cassandra indexes.  One scenario for the usage of these is documented here: 
> http://www.anuff.com/2010/07/secondary-indexes-in-cassandra.html.  Source for 
> contribution is attached and has been previously maintained on github here: 
> https://github.com/edanuff/CassandraCompositeType

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to