You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by S Ahmed <sa...@gmail.com> on 2010/07/02 01:25:04 UTC

facebook search index super column, do I have this correct?

So trying to map how facebook implemented a CF of type Super to index
message terms.

Is this json representation correct?

MessageIndex = {

   userid1 : {

    aloha : { messageIdList:
"234,2343234,23423434,234255,345345,2342,532432"},
    clown : { messageIdList: "632, 2342, 23452, 234234, 234234"},
    ..
    ..
    ..
   },

   userid2 : {

       eating : { messageIdList:
"234,2343234,23423434,234255,345345,2342,532432"},
    studying : { messageIdList: "632, 2342, 23452, 234234, 234234"},
    ..
    ..
    ..

   }

}


So if a user searches for the term "clown", they you perform a lookup in the
CF named "MessageIndex", and use do a lookup for the row of the currently
logged in user by UserID (which is the key), and then look for a a CF with
the term "clown" and return the value.

Is this a proper representation and am I using the correct terminology?

Re: facebook search index super column, do I have this correct?

Posted by S Ahmed <sa...@gmail.com>.
Actually I think in the video they said they store each messageID as a
seperate column, that way they can do range queries correct?

so it would be:

aloha: { message1: "2343", message2: "9590002", ....}

On Thu, Jul 1, 2010 at 6:25 PM, S Ahmed <sa...@gmail.com> wrote:

> So trying to map how facebook implemented a CF of type Super to index
> message terms.
>
> Is this json representation correct?
>
> MessageIndex = {
>
>    userid1 : {
>
>     aloha : { messageIdList:
> "234,2343234,23423434,234255,345345,2342,532432"},
>     clown : { messageIdList: "632, 2342, 23452, 234234, 234234"},
>     ..
>     ..
>     ..
>    },
>
>    userid2 : {
>
>        eating : { messageIdList:
> "234,2343234,23423434,234255,345345,2342,532432"},
>     studying : { messageIdList: "632, 2342, 23452, 234234, 234234"},
>     ..
>     ..
>     ..
>
>    }
>
> }
>
>
> So if a user searches for the term "clown", they you perform a lookup in
> the CF named "MessageIndex", and use do a lookup for the row of the
> currently logged in user by UserID (which is the key), and then look for a a
> CF with the term "clown" and return the value.
>
> Is this a proper representation and am I using the correct terminology?
>
>
>