# ES6 bug - Explain API fails deterministically for specific set of search parameters value

**URL:** <https://discuss.elastic.co/t/es6-bug-explain-api-fails-deterministically-for-specific-set-of-search-parameters-value/140968>\
**Category:** Elasticsearch\
**Created:** [July 20, 2018, 9:41pm UTC](https://discuss.elastic.co/t/es6-bug-explain-api-fails-deterministically-for-specific-set-of-search-parameters-value/140968 "2018-07-20T21:41:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pungent](https://avatars.discourse-cdn.com/v4/letter/p/a698b9/32.png) [@pungent](https://discuss.elastic.co/u/pungent)\
**Post date:** [July 20, 2018, 9:41pm UTC](https://discuss.elastic.co/t/es6-bug-explain-api-fails-deterministically-for-specific-set-of-search-parameters-value/140968/1 "2018-07-20T21:41:32Z")

</div>

I am using ES6.2 (on [elastic.co](http://elastic.co)) and I have a giant search query that has many in-line painless scripting. And in that search query, I have `"explain": true` to see the result scoring explanation. Most of the time the search result returns explanation, but for the same query with a specific set of different search parameters values, it doesn't return the `explanation` while it returns the search result correctly.

Is it a bug in ES itself that explanation disappear for some reason? Or do I need to do something to get explanation back consistently?

---

<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:** [July 22, 2018, 9:17pm UTC](https://discuss.elastic.co/t/es6-bug-explain-api-fails-deterministically-for-specific-set-of-search-parameters-value/140968/2 "2018-07-22T21:17:05Z")

</div>

> [@pungent](#):
>
> Is it a bug in ES itself that explanation disappear for some reason? Or do I need to do something to get explanation back consistently?

Without more information, like the query, it's extremely hard to say.

---

<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:** [August 19, 2018, 9:17pm UTC](https://discuss.elastic.co/t/es6-bug-explain-api-fails-deterministically-for-specific-set-of-search-parameters-value/140968/3 "2018-08-19T21:17:09Z")

</div>

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