Indexing composite columns


(Mohit Anchlia) #1

I am going through the first page about how to index documents in
JSON. Our data is little different, we use Cassandra composite type so
our column name and values could be something like:

{
John.Smith.timestamp : tweet
Aby:Gail:timestamp: tweet
}

or
{
date: John.Smit
}

How should I go about indexing such data?


(Shay Banon) #2

Cassandra data model and elasticsearch data model is different, if you are
talking about indexing tweets, one simple solution is to index each tweet as
a different (json) document.

On Sat, Aug 13, 2011 at 3:31 AM, Mohit Anchlia mohitanchlia@gmail.comwrote:

I am going through the first page about how to index documents in
JSON. Our data is little different, we use Cassandra composite type so
our column name and values could be something like:

{
John.Smith.timestamp : tweet
Aby:Gail:timestamp: tweet
}

or
{
date: John.Smit
}

How should I go about indexing such data?


(Mohit Anchlia) #3

On Sun, Aug 14, 2011 at 3:55 PM, Shay Banon kimchy@gmail.com wrote:

Cassandra data model and elasticsearch data model is different, if you are
talking about indexing tweets, one simple solution is to index each tweet as
a different (json) document.

So basically in my example below:

John.Smith.timestamp : tweet

would become:

{

firstname:John
lastname: Smith
Timestamp: 12223455
tweet: Hi

}

On Sat, Aug 13, 2011 at 3:31 AM, Mohit Anchlia mohitanchlia@gmail.com
wrote:

I am going through the first page about how to index documents in
JSON. Our data is little different, we use Cassandra composite type so
our column name and values could be something like:

{
John.Smith.timestamp : tweet
Aby:Gail:timestamp: tweet
}

or
{
date: John.Smit
}

How should I go about indexing such data?


(Shay Banon) #4

Yep.

On Mon, Aug 15, 2011 at 2:00 AM, Mohit Anchlia mohitanchlia@gmail.comwrote:

On Sun, Aug 14, 2011 at 3:55 PM, Shay Banon kimchy@gmail.com wrote:

Cassandra data model and elasticsearch data model is different, if you
are
talking about indexing tweets, one simple solution is to index each tweet
as
a different (json) document.

So basically in my example below:

John.Smith.timestamp : tweet

would become:

{

firstname:John
lastname: Smith
Timestamp: 12223455
tweet: Hi

}

On Sat, Aug 13, 2011 at 3:31 AM, Mohit Anchlia mohitanchlia@gmail.com
wrote:

I am going through the first page about how to index documents in
JSON. Our data is little different, we use Cassandra composite type so
our column name and values could be something like:

{
John.Smith.timestamp : tweet
Aby:Gail:timestamp: tweet
}

or
{
date: John.Smit
}

How should I go about indexing such data?


(system) #5