# Count the term from an specific field

**URL:** <https://discuss.elastic.co/t/count-the-term-from-an-specific-field/7393>\
**Category:** Elasticsearch\
**Created:** [April 19, 2012, 9:27am UTC](https://discuss.elastic.co/t/count-the-term-from-an-specific-field/7393 "2012-04-19T09:27:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sumit\_Guptaa](https://avatars.discourse-cdn.com/v4/letter/s/e8c25b/32.png) [@Sumit\_Guptaa](https://discuss.elastic.co/u/Sumit_Guptaa)\
**Post date:** [April 19, 2012, 9:27am UTC](https://discuss.elastic.co/t/count-the-term-from-an-specific-field/7393/1 "2012-04-19T09:27:34Z")

</div>

Hi all,  
i m very new in elasticsearch....pl help me...

we have created index name "my\_twitter2" and we want to search word "abc"from "message" : "abc xyz abc xyz asdsad fdfdf abc xyz abc" field and also we want to count the number of "abc" how much time appear and also count all the word that contain message filed...  
can anybody give the query for this..

curl -XPUT '[http://localhost:9200/my\_twitter2/](http://localhost:9200/my_twitter2/)  
curl -XPUT '[http://localhost:9200/my\_twitter2/my\_tweet2/1](http://localhost:9200/my_twitter2/my_tweet2/1)' -d '{  
"\_id" : 1,  
"user" : "hi hello hi hello whyyyy whennn hi hello hi",  
"post\_date" : "2009-11-23T14:12:12",  
"message" : "abc xyz abc xyz asdsad fdfdf abc xyz abc"  
}'

thanx in advance...

Regards,  
Sumit Gupta

---

<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, 3:32am UTC](https://discuss.elastic.co/t/count-the-term-from-an-specific-field/7393/2 "2017-07-06T03:32:03Z")

</div>


