# Specifying dfs\_query\_then\_fetch does not work for nested queries

**URL:** <https://discuss.elastic.co/t/specifying-dfs-query-then-fetch-does-not-work-for-nested-queries/46323>\
**Category:** Elasticsearch\
**Created:** [April 5, 2016, 4:21am UTC](https://discuss.elastic.co/t/specifying-dfs-query-then-fetch-does-not-work-for-nested-queries/46323 "2016-04-05T04:21:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kevinze](https://avatars.discourse-cdn.com/v4/letter/k/a3d4f5/32.png) [@kevinze](https://discuss.elastic.co/u/kevinze)\
**Post date:** [April 5, 2016, 4:21am UTC](https://discuss.elastic.co/t/specifying-dfs-query-then-fetch-does-not-work-for-nested-queries/46323/1 "2016-04-05T04:21:03Z")

</div>

Specifying [search\_type=dfs\_query\_then\_fetch](https://www.elastic.co/blog/understanding-query-then-fetch-vs-dfs-query-then-fetch) does not work for nested queries; the scores returned are still based on local information in each shard. Please see my gist [here](https://gist.github.com/kvnlte/6e9dc23e98f4845db0b69316b95b636a) for details.

Configuration  
Elasticsearch 2.3.0  
Number of nodes, shards, replicas: default  
Java version 1.7.0\_80, 64-Bit  
Tried it locally only, on Windows 10 64-Bit

_P.S. I am not sure whether this is a bug or an error on my part, so I am posting it here first._

---

<div class="post-metadata">

**Author:** ![kevinze](https://avatars.discourse-cdn.com/v4/letter/k/a3d4f5/32.png) [@kevinze](https://discuss.elastic.co/u/kevinze)\
**Post date:** [April 5, 2016, 12:11pm UTC](https://discuss.elastic.co/t/specifying-dfs-query-then-fetch-does-not-work-for-nested-queries/46323/2 "2016-04-05T12:11:48Z")

</div>

Ok I decided to file a Github issue [here](https://github.com/elastic/elasticsearch/issues/17535).

---

<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 5, 2017, 11:02pm UTC](https://discuss.elastic.co/t/specifying-dfs-query-then-fetch-does-not-work-for-nested-queries/46323/3 "2017-07-05T23:02:17Z")

</div>


