# Return the tokens of a field

**URL:** <https://discuss.elastic.co/t/return-the-tokens-of-a-field/9518>\
**Category:** Elasticsearch\
**Created:** [November 1, 2012, 2:06pm UTC](https://discuss.elastic.co/t/return-the-tokens-of-a-field/9518 "2012-11-01T14:06:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kennedy\_Idialu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kennedy_idialu/32/2532_2.png) [@Kennedy\_Idialu](https://discuss.elastic.co/u/Kennedy_Idialu)\
**Post date:** [November 1, 2012, 2:06pm UTC](https://discuss.elastic.co/t/return-the-tokens-of-a-field/9518/1 "2012-11-01T14:06:55Z")

</div>

How can I have the tokens of a particular field returned in the result

For example, A GET request

curl -XGET '[http://localhost:9200/twitter/tweet/1](http://localhost:9200/twitter/tweet/1)'

returns

{"\_index" : "twitter","\_type" : "tweet","\_id" : "1", "\_source" : {  
"user" : "kimchy",  
"postDate" : "2009-11-15T14:12:12",  
"message" : "trying out Elastic Search"} }

I would like to have the tokens of '\_source.message' field included in the  
result

--

---

<div class="post-metadata">

**Author:** ![Artem\_Grinblat](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/artem_grinblat/32/2327_2.png) [@Artem\_Grinblat](https://discuss.elastic.co/u/Artem_Grinblat)\
**Post date:** [November 2, 2012, 2:08am UTC](https://discuss.elastic.co/t/return-the-tokens-of-a-field/9518/2 "2012-11-02T02:08:02Z")

</div>

You could feed the message to the Analyze API[http://www.elasticsearch.org/guide/reference/api/admin-indices-analyze.html](http://www.elasticsearch.org/guide/reference/api/admin-indices-analyze.html)  
:  
curl -XGET 'localhost:9200/twitter/\_analyze?text=trying out Elastic Search'

--

---

<div class="post-metadata">

**Author:** ![Artem\_Grinblat](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/artem_grinblat/32/2327_2.png) [@Artem\_Grinblat](https://discuss.elastic.co/u/Artem_Grinblat)\
**Post date:** [November 2, 2012, 2:10am UTC](https://discuss.elastic.co/t/return-the-tokens-of-a-field/9518/3 "2012-11-02T02:10:36Z")

</div>

or better yet  
curl -XGET 'localhost:9200/twitter/\_analyze?field=tweet.message' -d 'trying  
out Elastic Search'

--

---

<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:06am UTC](https://discuss.elastic.co/t/return-the-tokens-of-a-field/9518/4 "2017-07-06T03:06:28Z")

</div>


