# Query search or keyword search failed on nested datatype field elasticsearch6.3.1

**URL:** https://discuss.elastic.co/t/query-search-or-keyword-search-failed-on-nested-datatype-field-elasticsearch6-3-1/159863
**Category:** Elasticsearch
**Created:** [December 7, 2018, 6:56am UTC](https://discuss.elastic.co/t/query-search-or-keyword-search-failed-on-nested-datatype-field-elasticsearch6-3-1/159863 "2018-12-07T06:56:00Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Vishnu\_P\_S](https://avatars.discourse-cdn.com/v4/letter/v/5f9b8f/32.png) [@Vishnu\_P\_S](https://discuss.elastic.co/u/Vishnu_P_S)
#### Post date: [December 7, 2018, 6:56am UTC](https://discuss.elastic.co/t/query-search-or-keyword-search-failed-on-nested-datatype-field-elasticsearch6-3-1/159863/1 "2018-12-07T06:56:00Z")

</div>

I am using elasticsearch version 6.3.1, previously I was using elasticsearch version 5.6.6. I have an index with fields of simple datatype as well as with nested type. In 5.6.6 if I search with keywords, it will return records that matches with the keyword. It will search on fields with any types(both simple and nested types). But in 6.3.1 if I search the same index with the same keywords, the matching is done only in the fields with simple datatype and the nested type fields are ignored. Is this a bug?

Sample search query : [http://localhost:9200/index-test2/\_search?q=UUID](http://localhost:9200/index-test2/_search?q=UUID)

---

<div class="post-metadata">

### Author: ![Vishnu\_P\_S](https://avatars.discourse-cdn.com/v4/letter/v/5f9b8f/32.png) [@Vishnu\_P\_S](https://discuss.elastic.co/u/Vishnu_P_S)
#### Post date: [December 10, 2018, 9:35am UTC](https://discuss.elastic.co/t/query-search-or-keyword-search-failed-on-nested-datatype-field-elasticsearch6-3-1/159863/2 "2018-12-10T09:35:45Z")

</div>

The above issue is because of the depreciation of `_all` field in the elasticsearch version 6.x. And this can be solved using `copy_to` parameter. Please see the below links for reference.

- [https://www.elastic.co/guide/en/elasticsearch/reference/current/copy-to.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/copy-to.html)

- [https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-all-field.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-all-field.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: [January 7, 2019, 9:35am UTC](https://discuss.elastic.co/t/query-search-or-keyword-search-failed-on-nested-datatype-field-elasticsearch6-3-1/159863/3 "2019-01-07T09:35:49Z")

</div>

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