# What is the difference between \_source and fields? When to use \_source vs fields in queries?

**URL:** https://discuss.elastic.co/t/what-is-the-difference-between--source-and-fields-when-to-use--source-vs-fields-in-queries/78647
**Category:** Elasticsearch
**Created:** [March 15, 2017, 6:16am UTC](https://discuss.elastic.co/t/what-is-the-difference-between--source-and-fields-when-to-use--source-vs-fields-in-queries/78647 "2017-03-15T06:16:12Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![sam99](https://avatars.discourse-cdn.com/v4/letter/s/53a042/32.png) [@sam99](https://discuss.elastic.co/u/sam99)
#### Post date: [March 15, 2017, 6:16am UTC](https://discuss.elastic.co/t/what-is-the-difference-between--source-and-fields-when-to-use--source-vs-fields-in-queries/78647/1 "2017-03-15T06:16:12Z")

</div>

I am reading the docs, but I am confused and do not think I understand what these mean. I need to get a specific set of key:value pairs that are an exact match in the specified query.

Do I use \_source or fields or something else?

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [March 16, 2017, 7:55am UTC](https://discuss.elastic.co/t/what-is-the-difference-between--source-and-fields-when-to-use--source-vs-fields-in-queries/78647/2 "2017-03-16T07:55:50Z")

</div>

Is this related to [Format Output of ElasticSearch](https://discuss.elastic.co/t/format-output-of-elasticsearch/78650)?

---

<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 13, 2017, 7:55am UTC](https://discuss.elastic.co/t/what-is-the-difference-between--source-and-fields-when-to-use--source-vs-fields-in-queries/78647/3 "2017-04-13T07:55:57Z")

</div>

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