# How to use absolute field names in query\_string search?

**URL:** <https://discuss.elastic.co/t/how-to-use-absolute-field-names-in-query-string-search/24356>\
**Category:** Elasticsearch\
**Created:** [June 25, 2015, 4:36pm UTC](https://discuss.elastic.co/t/how-to-use-absolute-field-names-in-query-string-search/24356 "2015-06-25T16:36:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![leandroico](https://avatars.discourse-cdn.com/v4/letter/l/91b2a8/32.png) [@leandroico](https://discuss.elastic.co/u/leandroico)\
**Post date:** [June 25, 2015, 4:36pm UTC](https://discuss.elastic.co/t/how-to-use-absolute-field-names-in-query-string-search/24356/1 "2015-06-25T16:36:02Z")

</div>

Hello.

I've posted the real question on StackOverflow already.  
So I'm going to simply paste the link to it:

> <https://stackoverflow.com/questions/31055741/how-to-use-absolute-field-names-in-query-string-search-with-fields>

Does anyone know how to handle such kind of cases?

Thank you.

---

<div class="post-metadata">

**Author:** ![leandroico](https://avatars.discourse-cdn.com/v4/letter/l/91b2a8/32.png) [@leandroico](https://discuss.elastic.co/u/leandroico)\
**Post date:** [June 26, 2015, 3:59am UTC](https://discuss.elastic.co/t/how-to-use-absolute-field-names-in-query-string-search/24356/2 "2015-06-26T03:59:42Z")

</div>

I found one solution for this. I'veposted on StackOverflow but I'm going to paste it in here as well:

* * *

One possible solution that I found out is to change the mapping of my indices.

To my dismay, I set all the nested fields that I have by using 'object' type, instead of 'nested'. I did a test over here and if I use 'nested' (I obviously had to re-index my documents), I get the desired result without having to change my search query, which is what I was basically looking for. For further details: [https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-nested-type.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-nested-type.html)

But I must admit that recreating indices and re-indexing data is an approach that I'm not very fond of neither.

---

<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, 12:05am UTC](https://discuss.elastic.co/t/how-to-use-absolute-field-names-in-query-string-search/24356/3 "2017-07-06T00:05:19Z")

</div>

Closed on July 6, 2017, 12:05am UTC


