# Order of the properties gets changed if "\_source":{ "exclude": \["title"\] } is used in a query

**URL:** <https://discuss.elastic.co/t/order-of-the-properties-gets-changed-if--source-exclude-title-is-used-in-a-query/22810>\
**Category:** Elasticsearch\
**Created:** [March 23, 2015, 5:33am UTC](https://discuss.elastic.co/t/order-of-the-properties-gets-changed-if--source-exclude-title-is-used-in-a-query/22810 "2015-03-23T05:33:12Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Debashish\_Paul](https://avatars.discourse-cdn.com/v4/letter/d/85f322/32.png) [@Debashish\_Paul](https://discuss.elastic.co/u/Debashish_Paul)\
**Post date:** [March 23, 2015, 5:33am UTC](https://discuss.elastic.co/t/order-of-the-properties-gets-changed-if--source-exclude-title-is-used-in-a-query/22810/1 "2015-03-23T05:33:12Z")

</div>

Hi,

I am facing a problem with using "\_source":{ "exclude": ["title"] } in my  
elastic query. Whenever I use this, my properties in the "\_source" get  
shuffled. What am I doing wrong?

Example:

## Without "\_source":{ "exclude": ["title"] }

"\_source":{  
"title" : ...  
"prop1" : ...  
"prop2" : ...  
"prop3" : ...  
"prop4" : ...  
}

## With "\_source":{ "exclude": ["title"] }

"\_source":{  
"prop3" : ...  
"prop1" : ...  
"prop4" : ...  
"prop2" : ...  
}

## Expected:

"\_source":{  
"prop1" : ...  
"prop2" : ...  
"prop3" : ...  
"prop4" : ...  
}

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/64c384c4-aae6-41f0-9ab5-4744015c55b4%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/64c384c4-aae6-41f0-9ab5-4744015c55b4%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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:25am UTC](https://discuss.elastic.co/t/order-of-the-properties-gets-changed-if--source-exclude-title-is-used-in-a-query/22810/2 "2017-07-06T00:25:00Z")

</div>

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


