# Prototype use of ElasticSearch Twitter River

**URL:** <https://discuss.elastic.co/t/prototype-use-of-elasticsearch-twitter-river/3547>\
**Category:** Elasticsearch\
**Created:** [November 10, 2010, 2:59pm UTC](https://discuss.elastic.co/t/prototype-use-of-elasticsearch-twitter-river/3547 "2010-11-10T14:59:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Daniel\_E](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/daniel_e/32/3137_2.png) [@Daniel\_E](https://discuss.elastic.co/u/Daniel_E)\
**Post date:** [November 10, 2010, 2:59pm UTC](https://discuss.elastic.co/t/prototype-use-of-elasticsearch-twitter-river/3547/1 "2010-11-10T14:59:24Z")

</div>

Mozilla Metrics has created a five node ElasticSearch cluster on some  
test machines that is using the Twitter River functionality to  
automatically retrieve a filtered set of documents from Twitter's  
streaming API and index them.

I've just created this page to document the first sample query:  
[https://wiki.mozilla.org/Army\_of\_Awesome/ElasticSearch\_Prototype](https://wiki.mozilla.org/Army_of_Awesome/ElasticSearch_Prototype)

I would love to get some feedback from the ES community on points/  
questions made on that page and improvements / ideas for the query.

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [November 10, 2010, 5:53pm UTC](https://discuss.elastic.co/t/prototype-use-of-elasticsearch-twitter-river/3547/2 "2010-11-10T17:53:47Z")

</div>

Hi,

Just wanted to post some answers to the questions raised in the wiki that  
we talked about on IRC:

1. The date key histogram facet field is returned as milliseconds since the  
epoch. This is done for two reasons, first is performance / memory usage,  
and the second is the fact that the format of the date is really user  
defined, so you get the milliseconds since the epoch, and can easily create  
a Date object around it and format it how you want.

2. total and mean are aggregation of the value field in the histogram facet.  
If no value field is specified, then the key values are used. It can be a  
script as well. It does not make a lot of sense in tweets, but imagine a  
tweet has a price, you could get the total and avg price per day that way.

3. Usually, it is better to have the filters separated. For example, having  
the filter be composed of an "and" filter, with a range one and a prefix  
one.

-shay.banon

On Wed, Nov 10, 2010 at 4:59 PM, Daniel E [deinspanjer@gmail.com](mailto:deinspanjer@gmail.com) wrote:

> Mozilla Metrics has created a five node Elasticsearch cluster on some  
> test machines that is using the Twitter River functionality to  
> automatically retrieve a filtered set of documents from Twitter's  
> streaming API and index them.
> 
> I've just created this page to document the first sample query:  
> [Army of Awesome/ElasticSearch Prototype - MozillaWiki](https://wiki.mozilla.org/Army_of_Awesome/ElasticSearch_Prototype)
> 
> I would love to get some feedback from the ES community on points/  
> questions made on that page and improvements / ideas for the query.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 4:16am UTC](https://discuss.elastic.co/t/prototype-use-of-elasticsearch-twitter-river/3547/3 "2017-07-06T04:16:46Z")

</div>


