# WordCloud in Elasticsearch

**URL:** <https://discuss.elastic.co/t/wordcloud-in-elasticsearch/23374>\
**Category:** Elasticsearch\
**Created:** [April 23, 2015, 1:08pm UTC](https://discuss.elastic.co/t/wordcloud-in-elasticsearch/23374 "2015-04-23T13:08:36Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jeff\_Fogarty](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jeff_fogarty/32/46751_2.png) [@Jeff\_Fogarty](https://discuss.elastic.co/u/Jeff_Fogarty)\
**Post date:** [April 23, 2015, 1:08pm UTC](https://discuss.elastic.co/t/wordcloud-in-elasticsearch/23374/1 "2015-04-23T13:08:36Z")

</div>

I looking to create a wordcloud in Jupyter (IPython Notebook) using either  
python or javascript. I have a collection of Presidential speeches from  
the millercenter.org loading into ES. I'm able to execute a termvector  
query which returns the below;

term  
term\_freq  
ttf  
doc\_freq

Is termvector the appropriate query for a wordcloud? If so, which  
numerical value should I use?

Thanks for your help.

Jeff

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/e8adafbf-b7fa-492d-ad20-b1c5b0fc0941%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/e8adafbf-b7fa-492d-ad20-b1c5b0fc0941%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![seralf](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/seralf/32/44805_2.png) [@seralf](https://discuss.elastic.co/u/seralf)\
**Post date:** [April 23, 2015, 3:26pm UTC](https://discuss.elastic.co/t/wordcloud-in-elasticsearch/23374/2 "2015-04-23T15:26:14Z")

</div>

Hi Jeff

IMHO a wordcloud visualization is simple to construct over facets, so if  
you have aggregations which counts how many documents you have for every  
term, this is probably the most simple way to construct it.  
If you want to use the term vectors it's important to understand what you  
want to describe, in particular.

What do you want to visualize? What do you expect emerging from data?

Il giorno giovedì 23 aprile 2015 15:08:36 UTC+2, Jeff Fogarty ha scritto:

> I looking to create a wordcloud in Jupyter (IPython Notebook) using either  
> python or javascript. I have a collection of Presidential speeches from  
> the [millercenter.org](http://millercenter.org) loading into ES. I'm able to execute a termvector  
> query which returns the below;
> 
> term  
> term\_freq  
> ttf  
> doc\_freq
> 
> Is termvector the appropriate query for a wordcloud? If so, which  
> numerical value should I use?
> 
> Thanks for your help.
> 
> Jeff

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/5f41b71b-aa6e-4399-9388-b7fc9d352fc7%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/5f41b71b-aa6e-4399-9388-b7fc9d352fc7%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Jeff\_Fogarty](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jeff_fogarty/32/46751_2.png) [@Jeff\_Fogarty](https://discuss.elastic.co/u/Jeff_Fogarty)\
**Post date:** [April 24, 2015, 1:06pm UTC](https://discuss.elastic.co/t/wordcloud-in-elasticsearch/23374/3 "2015-04-24T13:06:19Z")

</div>

Hi Alfredo, My goal is to use the features in ES to create a wordcloud as  
easy as possible. The termvector or significant terms query seem to be the  
most useful.

A visualization of the 'significant' words is all I'm after.

On Thursday, April 23, 2015 at 10:26:14 AM UTC-5, Alfredo Serafini wrote:

> Hi Jeff
> 
> IMHO a wordcloud visualization is simple to construct over facets, so if  
> you have aggregations which counts how many documents you have for every  
> term, this is probably the most simple way to construct it.  
> If you want to use the term vectors it's important to understand what you  
> want to describe, in particular.
> 
> What do you want to visualize? What do you expect emerging from data?
> 
> Il giorno giovedì 23 aprile 2015 15:08:36 UTC+2, Jeff Fogarty ha scritto:
> 
> > I looking to create a wordcloud in Jupyter (IPython Notebook) using  
> > either python or javascript. I have a collection of Presidential speeches  
> > from the [millercenter.org](http://millercenter.org) loading into ES. I'm able to execute a  
> > termvector query which returns the below;
> > 
> > term  
> > term\_freq  
> > ttf  
> > doc\_freq
> > 
> > Is termvector the appropriate query for a wordcloud? If so, which  
> > numerical value should I use?
> > 
> > Thanks for your help.
> > 
> > Jeff

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/d2857e82-6d79-41b4-8d19-6e3f25ede0e0%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/d2857e82-6d79-41b4-8d19-6e3f25ede0e0%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Mark\_Harwood](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mark_harwood/32/10538_2.png) [@Mark\_Harwood](https://discuss.elastic.co/u/Mark_Harwood)\
**Post date:** [April 24, 2015, 1:26pm UTC](https://discuss.elastic.co/t/wordcloud-in-elasticsearch/23374/4 "2015-04-24T13:26:28Z")

</div>

> A visualization of the 'significant' words is all I'm after.

The main question then is "significant compared to what?".

Straight popularity counts (e.g. terms agg) will just tell you the term  
"the" is very popular.  
To use significant\_terms you need to provide a foreground set and a  
background set to compare for differences.  
Examples therefore might be:  
\*What idioms do presidents use? \*: All presidential speeches Vs normal  
English (e.g. a sample of English Wikipedia content)  
_What is different about Obama as a president?_ Obama speeches Vs all  
other presidential speeches  
_What is Obama talking about now?:_ Obama speeches 2015 Vs all prior  
Obama speeches.

On Friday, April 24, 2015 at 2:06:19 PM UTC+1, Jeff Fogarty wrote:

> Hi Alfredo, My goal is to use the features in ES to create a wordcloud as  
> easy as possible. The termvector or significant terms query seem to be the  
> most useful.
> 
> A visualization of the 'significant' words is all I'm after.
> 
> On Thursday, April 23, 2015 at 10:26:14 AM UTC-5, Alfredo Serafini wrote:
> 
> > Hi Jeff
> > 
> > IMHO a wordcloud visualization is simple to construct over facets, so if  
> > you have aggregations which counts how many documents you have for every  
> > term, this is probably the most simple way to construct it.  
> > If you want to use the term vectors it's important to understand what you  
> > want to describe, in particular.
> > 
> > What do you want to visualize? What do you expect emerging from data?
> > 
> > Il giorno giovedì 23 aprile 2015 15:08:36 UTC+2, Jeff Fogarty ha scritto:
> > 
> > > I looking to create a wordcloud in Jupyter (IPython Notebook) using  
> > > either python or javascript. I have a collection of Presidential speeches  
> > > from the [millercenter.org](http://millercenter.org) loading into ES. I'm able to execute a  
> > > termvector query which returns the below;
> > > 
> > > term  
> > > term\_freq  
> > > ttf  
> > > doc\_freq
> > > 
> > > Is termvector the appropriate query for a wordcloud? If so, which  
> > > numerical value should I use?
> > > 
> > > Thanks for your help.
> > > 
> > > Jeff

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/8012a91b-6202-4385-9dcb-0860be24a72e%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/8012a91b-6202-4385-9dcb-0860be24a72e%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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, 12:17am UTC](https://discuss.elastic.co/t/wordcloud-in-elasticsearch/23374/5 "2017-07-06T00:17:49Z")

</div>


