Thanks! Better than mine, as it considered later additions of services! Will update my code, Thanks
*Tamar Fraenkel * Senior Software Engineer, TOK Media [image: Inline image 1] ta...@tok-media.com Tel: +972 2 6409736 Mob: +972 54 8356490 Fax: +972 2 5612956 On Mon, Mar 12, 2012 at 11:13 AM, aaron morton <aa...@thelastpickle.com>wrote: > In this case, where you know the query upfront, I add a custom secondary > index using another CF to support the query. It's a little easier here > because the data wont change. > > UserLookupCF (using composite types for the key value) > > row_key: <system_name:id> e.g. "facebook:12345" or "twitter:12345" > col_name : <internal_user_id> e.g. "5678" > col_value: empty > > Hope that helps. > > ----------------- > Aaron Morton > Freelance Developer > @aaronmorton > http://www.thelastpickle.com > > On 11/03/2012, at 11:15 PM, Tamar Fraenkel wrote: > > Hi! > Thanks for the response. > From what I read, secondary indices are good only for columns with few > possible values. Is this a good fit for my case? I have unique facebook id > for every user. > Thanks > > *Tamar Fraenkel * > Senior Software Engineer, TOK Media > > <tokLogo.png> > > ta...@tok-media.com > Tel: +972 2 6409736 > Mob: +972 54 8356490 > Fax: +972 2 5612956 > > > > > > On Sun, Mar 11, 2012 at 11:48 AM, Marcel Steinbach <mstei...@gmail.com>wrote: > >> Either you do that or you could think about using a secondary index on >> the fb user name in your primary cf. >> >> See http://www.datastax.com/docs/1.0/ddl/indexes >> >> Cheers >> >> Am 11.03.2012 um 09:51 schrieb Tamar Fraenkel <ta...@tok-media.com>: >> >> Hi! >> I need some advise: >> I have user CF, which has a UUID key which is my internal user id. >> One of the column is facebook_id of the user (if exist). >> >> I need to have the reverse mapping from facebook_id to my UUID. >> My intention is to add a CF for the mapping from Facebook Id to my id: >> >> user_by_fbid = { >> // key is fb Id, column name is our User Id, value is empty >> 100003101876963: { >> f94f6b20-161a-4f7e-995f-0466c62a1b6b : "" >> } >> } >> >> Does this makes sense. >> This CF will be used whenever a user log in through Facebook to retrieve >> the internal id. >> Thanks >> >> *Tamar Fraenkel * >> Senior Software Engineer, TOK Media >> >> <tokLogo.png> >> >> >> ta...@tok-media.com >> Tel: +972 2 6409736 >> Mob: +972 54 8356490 >> Fax: +972 2 5612956 >> >> >> >> > >
<<tokLogo.png>>