incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brandon Williams <dri...@gmail.com>
Subject Re: cms content and numerous sort operations
Date Mon, 05 Apr 2010 21:23:13 GMT
On Fri, Apr 2, 2010 at 10:06 AM, S Ahmed <sahmed1020@gmail.com> wrote:

> Greetings!
>
> Content management systems usually have complex sort operations, how would
> this be best handled with Cassandra?
>
> Is the only way to handle this type of situation to build indexes for each
> and every sort?
>
> example model:
>
> Content: {
>     contentID: {
>         title: "this is a title",
>         body: "this is the body"
>
>        // now these are all columns that need to be sorted by
>        isActive: "true",
>        publishingStatus: 3, // enumeration
>        revisionNumber: 234,
>        dateCreated: "2010/03/03",
>        dateModified: "2010/03/03",
>        datePublished: "2010/03/06",
>        authorID: 234,
>
>  }
> }
>
>
> The only solution I can think of is to create a seperate CF that maps the
> contentID and the column I need to sort by, so for dateCreated:
>
> ContentDateCreatedSort : {
>           contentID: { dateCreated: "2010/03/03" }
> }
>
>
> Am I on the right track here? Or is there a better way?


You're on the right track, denormalization is the best way to handle this.

-Brandon

Mime
View raw message