Need Indexing on collection
Hi, I need to have index built on collection .I have a column family where in one the column is a collection(set).Need some way to index this. My columnfamily looks like this:-
CREATE TABLE "ChangeRequestLog" ( "ChangeRequestID" uuid, "ChangeStatusID" int, "ChangeRequestCreateDateTime" timestamp, "ChangeRequestUpdateDateTime" timestamp, "SubmissionID" uuid, "SubmissionDateTime" timestamp, "SKUGroupID" int, "CreateUser" varchar, "UpdateUser" varchar, "PhotoID" set "<"uuid">", PRIMARY KEY("ChangeRequestID", "SubmissionID") );
Thanks Gargee
Could you please elaborate more on this use case? In
CREATE TABLE "ChangeRequestLog" ( "ChangeRequestID" uuid, "ChangeStatusID" int, "ChangeRequestCreateDateTime" timestamp, "ChangeRequestUpdateDateTime" timestamp,
"SubmissionID" uuid, "SubmissionDateTime" timestamp, "SKUGroupID" int, "CreateUser" varchar, "UpdateUser" varchar, "PhotoID" set , PRIMARY KEY("ChangeRequestID", "SubmissionID") );
which column contains Collection(set)?
-Vivek
oh the "< tag " is not visible in my last post ... so we have PhotoID set"<"uuid">" column which is the collection.
Yes. But data type in Cassandra for "Photos" values?
-Vivek
it will be time based UUID .
Ok. bit confusing. You want to store a collection attribute within UUID type, not sure about this?
Else, to create index on TimeUUID field, it should work with:
CREATE INDEX index_name ON keyspace_name.table_name ( column_name ).
Hi Vivek, I have 2 questions:- 1.Is there a way to create indexes on a collection type (set) in Cassandra?
CREATE TABLE "ChangeRequest" ( "ChangeRequestID" uuid, "ChangeStatusID" int, "ChangeRequestCreateDateTime" timestamp, "ChangeRequestUpdateDateTime" timestamp,
"SubmissionID" uuid, "SubmissionDateTime" timestamp, "SKUGroupID" int, "CreateUser" varchar, "UpdateUser" varchar, "PhotoID" set
Here the "PhotoID" set "<"uuid">" is the collection column
2.Does Kundera support collection types on cassandra?
From: Vivek Mishra <[email protected]mailto:[email protected]> Reply-To: impetus-opensource/Kundera <[email protected]mailto:[email protected]> Date: Wednesday, July 17, 2013 1:25 AM To: impetus-opensource/Kundera <[email protected]mailto:[email protected]> Cc: Gargee Banerjee <[email protected]mailto:[email protected]> Subject: Re: [Kundera] Need Indexing on collection (#326)
Ok. bit confusing. You want to store a collection attribute within UUID type, not sure about this?
Else, to create index on TimeUUID field, it should work with:
CREATE INDEX index_name ON keyspace_name.table_name ( column_name ).
— Reply to this email directly or view it on GitHubhttps://github.com/impetus-opensource/Kundera/issues/326#issuecomment-21098664.
1.Is there a way to create indexes on a collection type (set) in Cassandra?
Not supported by Cassandra.
2.Does Kundera support collection types on cassandra?
Nope. Currently it is supported via association only. Please refer https://github.com/impetus-opensource/Kundera/issues/219.
-Vivek
ok thanks ..please update us when we have collections supported in Kundera for cassandra.
Ok. Kindly let me know, your use case, Kundera usage and priority of this task?
-Vivek
Hi Vivek, We need this for our customer facing application for a critical project in our company.We had planned to roll this code to production by July end. My use-case demands me to save a collections of ids which are searchable.
Hi Gargee, Will discuss within team for this support. But indexing over collection attribute is not yet supported by Cassandra itself!
-Vivek
Ya I figured that out. But at least if we get Kundera to support collection (rather than through association) it will be nice. As the collection set we are planning won't be very big may be we need to fetch the collection for now from DB and find it in our application … With kundera's support for collection things will be easier to implement.
From: Vivek Mishra <[email protected]mailto:[email protected]> Reply-To: impetus-opensource/Kundera <[email protected]mailto:[email protected]> Date: Thursday, July 18, 2013 8:26 AM To: impetus-opensource/Kundera <[email protected]mailto:[email protected]> Cc: Gargee Banerjee <[email protected]mailto:[email protected]> Subject: Re: [Kundera] Need Indexing on collection (#326)
Hi Gargee, Will discuss within team for this support. But indexing over collection attribute is not yet supported by Cassandra itself!
-Vivek
— Reply to this email directly or view it on GitHubhttps://github.com/impetus-opensource/Kundera/issues/326#issuecomment-21191464.
Hi, We are assessing this support. Could you please share a maximum date by which this can wait to be delivered?
-Vivek
hi Vivek, we can max wait till Aug first week.
Hi Gargee, Collection support over Cassandra has been added. Please refer: https://github.com/impetus-opensource/Kundera/issues/219#issuecomment-21936137
I would suggest you to give it a try and let us know, if came across to know about any issue.
-Vivek
Hi Gargee, Did you get a chance to test this feature. I understand that you needed for your production release.
-Vivek
Are we good to close on this? Working fine with 2.6.1 ?
-Vivek
We are just testing the feature and will let you know asap.