# Visulizing the count of words in a pdf

**URL:** <https://discuss.elastic.co/t/visulizing-the-count-of-words-in-a-pdf/122850>\
**Category:** Kibana\
**Created:** [March 7, 2018, 9:08am UTC](https://discuss.elastic.co/t/visulizing-the-count-of-words-in-a-pdf/122850 "2018-03-07T09:08:45Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![akml\_kk](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/akml_kk/32/31069_2.png) [@akml\_kk](https://discuss.elastic.co/u/akml_kk)\
**Post date:** [March 7, 2018, 9:08am UTC](https://discuss.elastic.co/t/visulizing-the-count-of-words-in-a-pdf/122850/1 "2018-03-07T09:08:45Z")

</div>

Hello,  
I want to make a visulation of the count of words in a pdf.  
I have enabled the datafield to true.  
I found [here](https://discuss.elastic.co/t/visualizing-the-count-of-words-in-each-document-pdf-word-in-kibana/116523) the response that i can make a term aggregation in the field that contains my pdf but that dosen't work for me it display " 😐 no result found"

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [March 7, 2018, 4:22pm UTC](https://discuss.elastic.co/t/visulizing-the-count-of-words-in-a-pdf/122850/2 "2018-03-07T16:22:49Z")

</div>

Could you provide a full recreation script as described in [About the Elasticsearch category](https://discuss.elastic.co/t/about-the-elasticsearch-category/21). It will help to better understand what you are doing. Please, try to keep the example as simple as possible.

A full reproduction script will help readers to understand, reproduce and if needed fix your problem. It will also most likely help to get a faster answer.

---

<div class="post-metadata">

**Author:** ![akml\_kk](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/akml_kk/32/31069_2.png) [@akml\_kk](https://discuss.elastic.co/u/akml_kk)\
**Post date:** [March 8, 2018, 7:51am UTC](https://discuss.elastic.co/t/visulizing-the-count-of-words-in-a-pdf/122850/3 "2018-03-08T07:51:26Z")

</div>

actually it's not about code.  
it's about counting the number of words with kibana in a text field.  
with a visulastion.  
i found that in order to do an aggregation in a text field i need to enable datafield to true.  
the field in witch i need to create the count of word is "attachement.content in the photo below:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/1/d/1d2b25940f33959e6ec4d63af86d6eaa154bd867.png)

---

<div class="post-metadata">

**Author:** ![akml\_kk](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/akml_kk/32/31069_2.png) [@akml\_kk](https://discuss.elastic.co/u/akml_kk)\
**Post date:** [March 8, 2018, 10:10am UTC](https://discuss.elastic.co/t/visulizing-the-count-of-words-in-a-pdf/122850/4 "2018-03-08T10:10:28Z")

</div>

i don't know why that works today:

I can know make a visulation of count of words in the attachement.content , but this visulation dosent respond in Lucene search , "it display always all the count of words".

![image](https://us1.discourse-cdn.com/elastic/original/3X/a/2/a2eda82c6e9772cfb22dbee61d1fdecf22468c49.png)

what i want is when searching a word ,the visulaztion respond by displaying just the count for these word.  
even if i add a filter that dosen't work.  
I think the problem here because the data is unstructured ( not in rows)  
also the count isn't true for example the word "un" is repeated 3 times but the visuliztion shows just 1 and for all of words

---

<div class="post-metadata">

**Author:** ![akml\_kk](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/akml_kk/32/31069_2.png) [@akml\_kk](https://discuss.elastic.co/u/akml_kk)\
**Post date:** [March 8, 2018, 1:33pm UTC](https://discuss.elastic.co/t/visulizing-the-count-of-words-in-a-pdf/122850/5 "2018-03-08T13:33:23Z")

</div>

i found [here](https://discuss.elastic.co/t/kibana-words-histogram/44568)  
that term aggregation return the count of the number of document where the word exists notnot the total number of words across those documents.  
so is there a way to made a visulastion on the total number of words ??

---

<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:** [April 5, 2018, 2:01pm UTC](https://discuss.elastic.co/t/visulizing-the-count-of-words-in-a-pdf/122850/7 "2018-04-05T14:01:02Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
