Return-Path: Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: (qmail 35536 invoked from network); 6 Oct 2010 17:57:22 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 6 Oct 2010 17:57:22 -0000 Received: (qmail 68220 invoked by uid 500); 6 Oct 2010 17:57:20 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 68141 invoked by uid 500); 6 Oct 2010 17:57:20 -0000 Mailing-List: contact user-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cassandra.apache.org Delivered-To: mailing list user@cassandra.apache.org Received: (qmail 68133 invoked by uid 99); 6 Oct 2010 17:57:20 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Oct 2010 17:57:20 +0000 X-ASF-Spam-Status: No, hits=-0.1 required=10.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [149.165.134.51] (HELO mail.ictc.indiana.gigapop.net) (149.165.134.51) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Oct 2010 17:57:12 +0000 Received: by mail.ictc.indiana.gigapop.net (Postfix, from userid 7911) id 661547F4168; Wed, 6 Oct 2010 17:56:51 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on mail.ictc.indiana.gigapop.net X-Spam-Level: Received: from 129-79-255-127.dhcp-bl.indiana.edu (129-79-255-127.dhcp-bl.indiana.edu [129.79.255.127]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by mail.ictc.indiana.gigapop.net (Postfix) with ESMTP id 4EE987F416D for ; Wed, 6 Oct 2010 17:56:50 +0000 (UTC) From: Brayton Thompson Mime-Version: 1.0 (Apple Message framework v1081) Content-Type: multipart/alternative; boundary=Apple-Mail-2-990448313 Subject: Re: get keys based on values?? Date: Wed, 6 Oct 2010 13:56:49 -0400 In-Reply-To: To: user@cassandra.apache.org References: <649A15D5-25BF-47A0-B6D0-007EA1C93947@grnoc.iu.edu> Message-Id: X-Mailer: Apple Mail (2.1081) X-Virus-Checked: Checked by ClamAV on apache.org X-Old-Spam-Status: No, score=-5.2 required=5.0 tests=AWL,BAYES_00, FH_HELO_EQ_D_D_D_D,HELO_DYNAMIC_IPADDR2,HTML_MESSAGE,RDNS_DYNAMIC,TVD_RCVD_IP, USER_IN_WHITELIST autolearn=no version=3.2.5 --Apple-Mail-2-990448313 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii 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. >=20 > Then you can just use a secondary index on the "email_domain" column. >=20 > - Tyler >=20 > On Wed, Oct 6, 2010 at 10:33 AM, Brayton Thompson = wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 >=20 > Ok, I am VERY new to Cassandra and trying to get my head around its = core ideas. >=20 > 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. >=20 > Thank you, > Brayton Thompson > thompsbp@grnoc.iu.edu > Global Research Network Operation Center > Indiana University > -----BEGIN PGP SIGNATURE----- > Version: GnuPG/MacGPG2 v2.0.14 (Darwin) >=20 > iQIcBAEBAgAGBQJMrJa1AAoJENisXTckM+p9ffcP/1UmNDyWxDnOu41ZRcVwmJiE > +47QxqNc57WmdXX86FUvcauhPFFNZfbrbGwA61sof1sktSOL83osOXQuOfGr5GvT > tulU3+rQ1B+ea0x+aBESbKZwXHxckLGdst2Hro1eCVXEna+VvqkxNJ2rvYzE3hNM > FTNBWDIv3JbOChTYBnycBqg1iG5yMDkc2xEHlaiw9S/VsOPU18pPYrf42eoSqgnk > /rZDCxxiThznuaLI70QnU3O7ZTiyXpavN8BUW6KoeDZNAypgg1AayhEL2d67zZWu > qtnGEpoIeieinjccWMpkUrv2f14CZQ5gbJSLwPdoNLItYLnFvGHg0Ca/hXhrkIDr > BqnA0R5w2YHB+5p84gvj1NTRE0O2kXcUHkLDDBvnlLKUOUkoDyqr5tGAIwHhIwA7 > hpko76CyGN84bS8Kma+1D6e8wg9zqfiS9mvvErJCUOwyU5e+XeoiCdyhwgDHJKlW > T5UjMXdAHwyZly48J5l6jEJastHsL1wKAHeV/NlQ1gEx2CmnnJ0lBPDPqlT5Lxdb > uQFzS/YhFzxWL2gApHKF8EdCz4jFbPUggYYPsVgfYkNNBISgcIiQaEIIPkri96vb > V/xhnxLrFCO20NnGQ5PCTzCnZptyc3V+9WI542fnRGcS8SbF+N5BdLzoJBjtidrI > a/Nps/KUhJ5kVzJ0o8H3 > =3DoBhH > -----END PGP SIGNATURE----- >=20 --Apple-Mail-2-990448313 Content-Transfer-Encoding: 7bit Content-Type: text/html; charset=us-ascii 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.

- Tyler

On Wed, Oct 6, 2010 at 10:33 AM, Brayton Thompson <thompsbp@grnoc.iu.edu> wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

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.

Thank you,
Brayton Thompson
thompsbp@grnoc.iu.edu
Global Research Network Operation Center
Indiana University
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.14 (Darwin)

iQIcBAEBAgAGBQJMrJa1AAoJENisXTckM+p9ffcP/1UmNDyWxDnOu41ZRcVwmJiE
+47QxqNc57WmdXX86FUvcauhPFFNZfbrbGwA61sof1sktSOL83osOXQuOfGr5GvT
tulU3+rQ1B+ea0x+aBESbKZwXHxckLGdst2Hro1eCVXEna+VvqkxNJ2rvYzE3hNM
FTNBWDIv3JbOChTYBnycBqg1iG5yMDkc2xEHlaiw9S/VsOPU18pPYrf42eoSqgnk
/rZDCxxiThznuaLI70QnU3O7ZTiyXpavN8BUW6KoeDZNAypgg1AayhEL2d67zZWu
qtnGEpoIeieinjccWMpkUrv2f14CZQ5gbJSLwPdoNLItYLnFvGHg0Ca/hXhrkIDr
BqnA0R5w2YHB+5p84gvj1NTRE0O2kXcUHkLDDBvnlLKUOUkoDyqr5tGAIwHhIwA7
hpko76CyGN84bS8Kma+1D6e8wg9zqfiS9mvvErJCUOwyU5e+XeoiCdyhwgDHJKlW
T5UjMXdAHwyZly48J5l6jEJastHsL1wKAHeV/NlQ1gEx2CmnnJ0lBPDPqlT5Lxdb
uQFzS/YhFzxWL2gApHKF8EdCz4jFbPUggYYPsVgfYkNNBISgcIiQaEIIPkri96vb
V/xhnxLrFCO20NnGQ5PCTzCnZptyc3V+9WI542fnRGcS8SbF+N5BdLzoJBjtidrI
a/Nps/KUhJ5kVzJ0o8H3
=oBhH
-----END PGP SIGNATURE-----


--Apple-Mail-2-990448313--