# Retrieve just the snippets?

**URL:** <https://discuss.elastic.co/t/retrieve-just-the-snippets/9926>\
**Category:** Elasticsearch\
**Created:** [December 4, 2012, 6:13am UTC](https://discuss.elastic.co/t/retrieve-just-the-snippets/9926 "2012-12-04T06:13:49Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![A\_Zed](https://avatars.discourse-cdn.com/v4/letter/a/eb8c5e/32.png) [@A\_Zed](https://discuss.elastic.co/u/A_Zed)\
**Post date:** [December 4, 2012, 6:13am UTC](https://discuss.elastic.co/t/retrieve-just-the-snippets/9926/1 "2012-12-04T06:13:49Z")

</div>

New to ES here. Is it possible to retrieve just the snippets ("highlights")  
instead of the entire document for a search?

--

---

<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:** [December 4, 2012, 7:03am UTC](https://discuss.elastic.co/t/retrieve-just-the-snippets/9926/2 "2012-12-04T07:03:18Z")

</div>

Hi,

You can disable \_source in your mapping, set store to yes for the field you want to highlight.

See [http://www.elasticsearch.org/guide/reference/mapping/core-types.html](http://www.elasticsearch.org/guide/reference/mapping/core-types.html) for more information about mapping.

You can also let \_source enabled, but in your query, ask for specific fields instead of \_source (default). See: [http://www.elasticsearch.org/guide/reference/api/search/fields.html](http://www.elasticsearch.org/guide/reference/api/search/fields.html)

Does it help?

--  
David 😉  
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 4 déc. 2012 à 07:13, A Zed [exmaple@gmail.com](mailto:exmaple@gmail.com) a écrit :

New to ES here. Is it possible to retrieve just the snippets ("highlights") instead of the entire document for a search?

--

--

---

<div class="post-metadata">

**Author:** ![A\_Zed](https://avatars.discourse-cdn.com/v4/letter/a/eb8c5e/32.png) [@A\_Zed](https://discuss.elastic.co/u/A_Zed)\
**Post date:** [December 4, 2012, 3:00pm UTC](https://discuss.elastic.co/t/retrieve-just-the-snippets/9926/3 "2012-12-04T15:00:54Z")

</div>

I feel like an idiot now. I could just set the "fields" field in the query  
to fetch everything else. 😃  
Thanks!

On Monday, December 3, 2012 11:03:18 PM UTC-8, David Pilato wrote:

> Hi,
> 
> You can disable \_source in your mapping, set store to yes for the field  
> you want to highlight.
> 
> See [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/mapping/core-types.html) for  
> more information about mapping.
> 
> You can also let \_source enabled, but in your query, ask for specific  
> fields instead of \_source (default). See:  
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/api/search/fields.html)
> 
> Does it help?
> 
> --  
> David 😉  
> Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs
> 
> Le 4 déc. 2012 à 07:13, A Zed \<[exm...@gmail.com](mailto:exm...@gmail.com) \<javascript:\>\> a écrit :
> 
> New to ES here. Is it possible to retrieve just the snippets  
> ("highlights") instead of the entire document for a 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:01am UTC](https://discuss.elastic.co/t/retrieve-just-the-snippets/9926/4 "2017-07-06T03:01:35Z")

</div>


