Bitmask operators exist?

2011-08-19 Thread Benjamin Padgett
Have a column family with a few secondary indexes and I am trying to find 
records where multiple flags are set using a bitmask.  I do not see 
documentation on bitmask operators so I am unsure if they exist.

I am new to Cassandra and am trying to avoid making multiple indexed slices.  
Does anyone have any suggestions?

Example:

Tags: Good, Bad, Ok, Somewhat Ok

I would like to find values that are Good or Bad for example!

Thanks for any help!

Benjamin Padgett
Consultant

CISION US, INC.
332 S. Michigan Ave.
Chicago, IL. 60604
field_telephone
Main: 1-866-639-5087


Email: benjamin.padg...@cision.com 
Web: cision.com 
Blog: blog.cision.com 
Connect with us on Twitter and 
Facebook
You have a story to tell. That much never changes, but the way you get it out 
does. Every media response can change your public image, for better or worse. 
Whether you're a marketing or PR professional, Cision's award-winning software 
brings together all the elements you need to engage the right influencers, get 
coverage, achieve measurable results and manage your campaigns. Cision. Power 
Your Story.

With a presence in Europe, North America and Asia, and partners in over 125 
countries, Cision is quoted on the Nordic Exchange with revenue of SEK 1.1 
billion in 2010.


Re: Bitmask operators exist?

2011-08-19 Thread Jonathan Ellis
On Fri, Aug 19, 2011 at 10:08 AM, Benjamin Padgett
 wrote:
> Have a column family with a few secondary indexes and I am trying to find 
> records where multiple flags are set using a bitmask.  I do not see 
> documentation on bitmask operators so I am unsure if they exist.

They do not, sorry.

-- 
Jonathan Ellis
Project Chair, Apache Cassandra
co-founder of DataStax, the source for professional Cassandra support
http://www.datastax.com


RE: Bitmask operators exist?

2011-08-19 Thread Benjamin Padgett
 What would you suggest for handling such a situation?  I come from RDMS 
world...

Is it typical for a Cassandra implementation to make multiple slices to get the 
desired data?

Thanks for the quick response!


Benjamin Padgett
benjamin.padg...@cision.com

-Original Message-
From: Jonathan Ellis [mailto:jbel...@gmail.com] 
Sent: Friday, August 19, 2011 10:38 AM
To: dev@cassandra.apache.org
Subject: Re: Bitmask operators exist?

On Fri, Aug 19, 2011 at 10:08 AM, Benjamin Padgett 
 wrote:
> Have a column family with a few secondary indexes and I am trying to find 
> records where multiple flags are set using a bitmask.  I do not see 
> documentation on bitmask operators so I am unsure if they exist.

They do not, sorry.

--
Jonathan Ellis
Project Chair, Apache Cassandra
co-founder of DataStax, the source for professional Cassandra support 
http://www.datastax.com


Re: Bitmask operators exist?

2011-08-19 Thread Jason Kolb
Have you considered creating a composite key for the various permutations of 
values that you need to query? For example "good.ok" could contain a column for 
each entity with the value specifying whether the entity is "good" or "ok". You 
could the. Have another composite key for "good.bad", "bad.ok" etc. 

I've found that in order to reduce reads with Cassandra you often need to write 
the same data more than once in multiple places to suit your queries. I 
actually started implementing a bitmap operator at one point but it turned out 
to require more reads on the backend than it was worth. Cassandra already 
provides the bloom filter for probabilistic reads based on row keys, I think 
you want to try to leverage that as much as possible. 

Jason

On Aug 19, 2011, at 10:43 AM, Benjamin Padgett  
wrote:

> What would you suggest for handling such a situation?  I come from RDMS 
> world...
> 
> Is it typical for a Cassandra implementation to make multiple slices to get 
> the desired data?
> 
> Thanks for the quick response!
> 
> 
> Benjamin Padgett
> benjamin.padg...@cision.com
> 
> -Original Message-
> From: Jonathan Ellis [mailto:jbel...@gmail.com] 
> Sent: Friday, August 19, 2011 10:38 AM
> To: dev@cassandra.apache.org
> Subject: Re: Bitmask operators exist?
> 
> On Fri, Aug 19, 2011 at 10:08 AM, Benjamin Padgett 
>  wrote:
>> Have a column family with a few secondary indexes and I am trying to find 
>> records where multiple flags are set using a bitmask.  I do not see 
>> documentation on bitmask operators so I am unsure if they exist.
> 
> They do not, sorry.
> 
> --
> Jonathan Ellis
> Project Chair, Apache Cassandra
> co-founder of DataStax, the source for professional Cassandra support 
> http://www.datastax.com


Reminder: 1.0 feature freeze Sept 8

2011-08-19 Thread Jonathan Ellis
Hi all,

The 1.0 feature freeze is coming up on Sept 8, to be followed shortly
by a beta release.

To make it easier to plan what we can finish before then, I'm going to
go through the 68 open Jira tickets and take my best guesses.  Tickets
that haven't been showing signs of life will be moved to 1.1 or
unscheduled.

If I do this to a ticket you are planning to address before the
freeze, do not take this as a veto of that plan. Go ahead and
reinstate it, ideally with an update as to what progress you've made
so far.

-- 
Jonathan Ellis
Project Chair, Apache Cassandra
co-founder of DataStax, the source for professional Cassandra support
http://www.datastax.com


RE: Bitmask operators exist?

2011-08-19 Thread Benjamin Padgett
Jason,

Thank you for the good advice...I will put it to good use!


Benjamin Padgett
benjamin.padg...@cision.com


-Original Message-
From: Jason Kolb [mailto:jason.k...@gmail.com] 
Sent: Friday, August 19, 2011 1:35 PM
To: dev@cassandra.apache.org
Subject: Re: Bitmask operators exist?

Have you considered creating a composite key for the various permutations of 
values that you need to query? For example "good.ok" could contain a column for 
each entity with the value specifying whether the entity is "good" or "ok". You 
could the. Have another composite key for "good.bad", "bad.ok" etc. 

I've found that in order to reduce reads with Cassandra you often need to write 
the same data more than once in multiple places to suit your queries. I 
actually started implementing a bitmap operator at one point but it turned out 
to require more reads on the backend than it was worth. Cassandra already 
provides the bloom filter for probabilistic reads based on row keys, I think 
you want to try to leverage that as much as possible. 

Jason

On Aug 19, 2011, at 10:43 AM, Benjamin Padgett  
wrote:

> What would you suggest for handling such a situation?  I come from RDMS 
> world...
> 
> Is it typical for a Cassandra implementation to make multiple slices to get 
> the desired data?
> 
> Thanks for the quick response!
> 
> 
> Benjamin Padgett
> benjamin.padg...@cision.com
> 
> -Original Message-
> From: Jonathan Ellis [mailto:jbel...@gmail.com] 
> Sent: Friday, August 19, 2011 10:38 AM
> To: dev@cassandra.apache.org
> Subject: Re: Bitmask operators exist?
> 
> On Fri, Aug 19, 2011 at 10:08 AM, Benjamin Padgett 
>  wrote:
>> Have a column family with a few secondary indexes and I am trying to find 
>> records where multiple flags are set using a bitmask.  I do not see 
>> documentation on bitmask operators so I am unsure if they exist.
> 
> They do not, sorry.
> 
> --
> Jonathan Ellis
> Project Chair, Apache Cassandra
> co-founder of DataStax, the source for professional Cassandra support 
> http://www.datastax.com