Ok, let me tweak the scenario a tiny bit. What if I wanted something extremely arbitrary, for instance... simple comparisons like a WHERE clause in SQL....
get Users.someuser['uuid'] where Users.someuser['age'] > 33
From what i've read this functionality defeats the point of Cassandra because instead of indexing directly to a value C* would have to got to a value and run a check for every entry. Am I correct here?
So would my best bet be to simply get ALL of my users uuids and ages, then throw away all of those that do not meet the required test?
On Oct 6, 2010, at 2:09 PM, Matthew Dennis wrote:
As Norman said, secondary indexes are only in .7 but you can create standard indexes in both .6 and .7
Basically have a email_domain_idx CF where the row key is the domain and the column names have the row id of the user (the column value is unused in this scenario). This sounds basically like what you described in your original post. That's a very common way to do it in Cassandra (C*). This is not all that different to what MySQL, PGSQl, etc do for you automatically, just in C* you have to do it manually and remember to write to that index column family whenever you write to the users CF.
On Wed, Oct 6, 2010 at 12:56 PM, Brayton Thompson <email@example.com>
Are secondary index's available in .6.5? or are they only in .7?
On Oct 6, 2010, at 1:15 PM, Tyler Hobbs wrote:
If you're interested in only checking part of a column's value, you can generally
just store that part of the value in a different column. So, have an "email_addr" column
and a "email_domain" column, which stores "aol.com", for example.
Then you can just use a secondary index on the "email_domain" column.
On Wed, Oct 6, 2010 at 10:33 AM, Brayton Thompson <firstname.lastname@example.org>
-----BEGIN PGP SIGNED MESSAGE-----
Ok, I am VERY new to Cassandra and trying to get my head around its core ideas.
So lets say I have a CF of Users that contains all the info I would ever want to know about them. One day I decide(for some reason) that I want to send a mass email to only the users with AOL email addresses. Is there a mechanism for getting only keys whose email attribute contains the string @aol.com ? Or is this frowned upon? I could also envision separate CF's for each email type; that stored values to use as keys into my Users CF. Say the AOL CF contains the usernames of everyone that has an aol account. So I would pull all of the keys from that CF and then use them to index into the Users CF to pull their email addresses. It seems to me that this is redundant. So I would like your thoughts on my example.
Global Research Network Operation Center
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.14 (Darwin)
-----END PGP SIGNATURE-----
Software and Support for Apache Cassandra
m: 512.587.0900 f: 866.583.2068