Build "Google Trends" style dataset from ES

Hi All,

Total noob here. I have a set of tweets in elastic search and I want to be
able to look up a group of words (word1, word2, word3 etc.) on each tweet
for a group of twitter handles and extract a csv or JSON that shows just
the count of words and a time stamp so I can visualize this sort of like
Google Trends. Ideally, I would like to compare different groups of
twitter handles to each other based on the groupings of words.

Any and all help super appreciated.

Thanks

Jesse

--

Or if someone could tell me how to use the count API with a JSON request
like:

{
"filtered" : {
"query" : {
"terms" : { "user.screen_name" : ["user1", "user2"]}
},
"filter" : {
"range" : {
"created_at" : { "from" : "2012-09-01", "to" : "2012-11-01"
}
}
}
}
}

I think that would solve the trick!

On Monday, November 5, 2012 9:52:45 AM UTC-8, jesse heaslip wrote:

Hi All,

Total noob here. I have a set of tweets in Elasticsearch and I want to
be able to look up a group of words (word1, word2, word3 etc.) on each
tweet for a group of twitter handles and extract a csv or JSON that shows
just the count of words and a time stamp so I can visualize this sort of
like Google Trends. Ideally, I would like to compare different groups of
twitter handles to each other based on the groupings of words.

Any and all help super appreciated.

Thanks

Jesse

--

Did you try something like?
$ curl -XGET 'http://localhost:9200/twitter/tweet/_count' -d '
{
"filtered" : {
"query" : {
"terms" : { "user.screen_name" : ["user1", "user2"]}
},
"filter" : {
"range" : {
"created_at" : { "from" : "2012-09-01", "to" : "2012-11-01" }
}
}
}
}'

HTH

--
David :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 5 nov. 2012 à 19:11, jesse heaslip jesse.heaslip@gmail.com a écrit :

Or if someone could tell me how to use the count API with a JSON request like:

{
"filtered" : {
"query" : {
"terms" : { "user.screen_name" : ["user1", "user2"]}
},
"filter" : {
"range" : {
"created_at" : { "from" : "2012-09-01", "to" : "2012-11-01" }
}
}
}
}

I think that would solve the trick!

On Monday, November 5, 2012 9:52:45 AM UTC-8, jesse heaslip wrote:

Hi All,

Total noob here. I have a set of tweets in Elasticsearch and I want to be able to look up a group of words (word1, word2, word3 etc.) on each tweet for a group of twitter handles and extract a csv or JSON that shows just the count of words and a time stamp so I can visualize this sort of like Google Trends. Ideally, I would like to compare different groups of twitter handles to each other based on the groupings of words.

Any and all help super appreciated.

Thanks

Jesse

--

--

But you probably should look at facet feature.

HTH

--
David :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 5 nov. 2012 à 21:46, David Pilato david@pilato.fr a écrit :

Did you try something like?
$ curl -XGET 'http://localhost:9200/twitter/tweet/_count' -d '
{
"filtered" : {
"query" : {
"terms" : { "user.screen_name" : ["user1", "user2"]}
},
"filter" : {
"range" : {
"created_at" : { "from" : "2012-09-01", "to" : "2012-11-01" }
}
}
}
}'

HTH

--
David :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 5 nov. 2012 à 19:11, jesse heaslip jesse.heaslip@gmail.com a écrit :

Or if someone could tell me how to use the count API with a JSON request like:

{
"filtered" : {
"query" : {
"terms" : { "user.screen_name" : ["user1", "user2"]}
},
"filter" : {
"range" : {
"created_at" : { "from" : "2012-09-01", "to" : "2012-11-01" }
}
}
}
}

I think that would solve the trick!

On Monday, November 5, 2012 9:52:45 AM UTC-8, jesse heaslip wrote:

Hi All,

Total noob here. I have a set of tweets in Elasticsearch and I want to be able to look up a group of words (word1, word2, word3 etc.) on each tweet for a group of twitter handles and extract a csv or JSON that shows just the count of words and a time stamp so I can visualize this sort of like Google Trends. Ideally, I would like to compare different groups of twitter handles to each other based on the groupings of words.

Any and all help super appreciated.

Thanks

Jesse

--

--

--

Sadly can't seem get localhost up and running on my machine... like I said,
total noob. I have been using the elasticsearch-head. Any advice on where
to go to get local host running and then I can start to run some of these
queries through terminal?

Thanks for all your help!

On Monday, November 5, 2012 12:46:06 PM UTC-8, David Pilato wrote:

Did you try something like?

$ curl -XGET 'http://localhost:9200/twitter/tweet/_count' -d '
{
"filtered" : {
"query" : {
"terms" : { "user.screen_name" : ["user1", "user2"]}
},
"filter" : {
"range" : {
"created_at" : { "from" : "2012-09-01", "to" : "2012-11-01" }
}
}
}
}'

HTH

--
David :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 5 nov. 2012 à 19:11, jesse heaslip <jesse....@gmail.com <javascript:>>
a écrit :

Or if someone could tell me how to use the count API with a JSON request
like:

{
"filtered" : {
"query" : {
"terms" : { "user.screen_name" : ["user1", "user2"]}
},
"filter" : {
"range" : {
"created_at" : { "from" : "2012-09-01", "to" :
"2012-11-01" }
}
}
}
}

I think that would solve the trick!

On Monday, November 5, 2012 9:52:45 AM UTC-8, jesse heaslip wrote:

Hi All,

Total noob here. I have a set of tweets in Elasticsearch and I want to
be able to look up a group of words (word1, word2, word3 etc.) on each
tweet for a group of twitter handles and extract a csv or JSON that shows
just the count of words and a time stamp so I can visualize this sort of
like Google Trends. Ideally, I would like to compare different groups of
twitter handles to each other based on the groupings of words.

Any and all help super appreciated.

Thanks

Jesse

--

--

NVM. Local host on the go. Thanks for you help

On Monday, November 5, 2012 2:29:45 PM UTC-8, jesse heaslip wrote:

Sadly can't seem get localhost up and running on my machine... like I
said, total noob. I have been using the elasticsearch-head. Any advice on
where to go to get local host running and then I can start to run some of
these queries through terminal?

Thanks for all your help!

On Monday, November 5, 2012 12:46:06 PM UTC-8, David Pilato wrote:

Did you try something like?

$ curl -XGET 'http://localhost:9200/twitter/tweet/_count' -d '
{
"filtered" : {
"query" : {
"terms" : { "user.screen_name" : ["user1", "user2"]}
},
"filter" : {
"range" : {
"created_at" : { "from" : "2012-09-01", "to" : "2012-11-01" }
}
}
}
}'

HTH

--
David :wink:
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 5 nov. 2012 à 19:11, jesse heaslip jesse....@gmail.com a écrit :

Or if someone could tell me how to use the count API with a JSON request
like:

{
"filtered" : {
"query" : {
"terms" : { "user.screen_name" : ["user1", "user2"]}
},
"filter" : {
"range" : {
"created_at" : { "from" : "2012-09-01", "to" :
"2012-11-01" }
}
}
}
}

I think that would solve the trick!

On Monday, November 5, 2012 9:52:45 AM UTC-8, jesse heaslip wrote:

Hi All,

Total noob here. I have a set of tweets in Elasticsearch and I want to
be able to look up a group of words (word1, word2, word3 etc.) on each
tweet for a group of twitter handles and extract a csv or JSON that shows
just the count of words and a time stamp so I can visualize this sort of
like Google Trends. Ideally, I would like to compare different groups of
twitter handles to each other based on the groupings of words.

Any and all help super appreciated.

Thanks

Jesse

--

--