Regex in pycassa

31 views
Skip to first unread message

Sam

unread,
Mar 24, 2014, 4:39:55 AM3/24/14
to pycassa...@googlegroups.com
Hi,

Can regex be used in cassandra queries / pycassa .

Say I want to fetch all the row keys that have some part of it common

Rowkeys as below:

"business_details".[0]."biz_name"
"business_details".[0]."biz_rank"

"business_details".[1]."biz_name"
"business_details".[1]."biz_rank"

Basically business_details is a list of 2 elements containing biz_name and biz_rank as part of  each list element.

So here I want to make "business_details" as part of regex which brings up the entire list. I do not want to use "start" and "end" as the list is grows in future and there would be overhead of remembering the number of list elements.


If there is NO regex feature in cassandra/pycassa ... is there any efficient way of addressing my problem.

Thanks

--
Sam


Tyler Hobbs

unread,
Mar 26, 2014, 1:18:36 PM3/26/14
to pycassa...@googlegroups.com

On Mon, Mar 24, 2014 at 3:39 AM, Sam <srina...@gmail.com> wrote:
If there is NO regex feature in cassandra/pycassa ... is there any efficient way of addressing my problem.

There's not a regex feature in cassandra or pycassa.  Even if there were, it wouldn't scale well.

You need to run your regex at *insert* time, and if something matches it, also insert that data into a special column family or row that just contains matches for that regex.

--
Tyler Hobbs
DataStax
Reply all
Reply to author
Forward
0 new messages