# Search throw multiple fields on a document

**URL:** <https://discuss.elastic.co/t/search-throw-multiple-fields-on-a-document/166419>\
**Category:** Elasticsearch\
**Created:** [January 30, 2019, 7:18pm UTC](https://discuss.elastic.co/t/search-throw-multiple-fields-on-a-document/166419 "2019-01-30T19:18:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![AustinFelipe](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/austinfelipe/32/40386_2.png) [@AustinFelipe](https://discuss.elastic.co/u/AustinFelipe)\
**Post date:** [January 30, 2019, 7:18pm UTC](https://discuss.elastic.co/t/search-throw-multiple-fields-on-a-document/166419/1 "2019-01-30T19:18:25Z")

</div>

Hey!

Well, I'm a new Elastic Search user and I'd like to know how to query on multiple fields at a document inside Elastic with just on text input.

Consider these documents:

```
{
   "description": "Some pretty nice description",
   "color": "white",
   "category": "electronic"
},
{
   "description": "Some strange description",
   "color": "black",
   "category": "electronic"
},

```

If I type `some white electronic` it should return the first one. If I type `black electronic` it should return the second one.

What I've seen so far at docs is that is possible to filter by each field but how to search over all of them?

Thanks!

---

<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:** [January 30, 2019, 7:36pm UTC](https://discuss.elastic.co/t/search-throw-multiple-fields-on-a-document/166419/2 "2019-01-30T19:36:21Z")

</div>

You probably want to use `copy_to` to create a single field that can be searched across, check out [https://www.elastic.co/guide/en/elasticsearch/reference/6.6/copy-to.html](https://www.elastic.co/guide/en/elasticsearch/reference/6.6/copy-to.html)

---

<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:** [February 27, 2019, 7:36pm UTC](https://discuss.elastic.co/t/search-throw-multiple-fields-on-a-document/166419/3 "2019-02-27T19:36:25Z")

</div>

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