# Aggregate a count of matched words among documents

**URL:** https://discuss.elastic.co/t/aggregate-a-count-of-matched-words-among-documents/19265
**Category:** Elasticsearch
**Created:** [August 13, 2014, 4:31pm UTC](https://discuss.elastic.co/t/aggregate-a-count-of-matched-words-among-documents/19265 "2014-08-13T16:31:30Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Travis\_Bullock](https://avatars.discourse-cdn.com/v4/letter/t/35a633/32.png) [@Travis\_Bullock](https://discuss.elastic.co/u/Travis_Bullock)
#### Post date: [August 13, 2014, 4:31pm UTC](https://discuss.elastic.co/t/aggregate-a-count-of-matched-words-among-documents/19265/1 "2014-08-13T16:31:30Z")

</div>

Hi everyone. I have a set of documents that represent web site pages, and  
I'd like to query the total _word_ matches for a term within a specific  
site. For example, find all documents from the site "[www.example.com](http://www.example.com)" and  
count the total number of occurrences of words matching "example" among the  
documents.

I don't want the number of document hits - I want to know how many times a  
word is mentioned within the site's content.

Is this possible? Can someone give me a rough idea of where to start?

Thanks,  
Travis

--  
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/6d98122a-653e-4898-8eed-869c7a3e93c7%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/6d98122a-653e-4898-8eed-869c7a3e93c7%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, 1:08am UTC](https://discuss.elastic.co/t/aggregate-a-count-of-matched-words-among-documents/19265/2 "2017-07-06T01:08:50Z")

</div>


