# My index is giving shard error

**URL:** <https://discuss.elastic.co/t/my-index-is-giving-shard-error/208681>\
**Category:** Kibana\
**Created:** [November 20, 2019, 11:26am UTC](https://discuss.elastic.co/t/my-index-is-giving-shard-error/208681 "2019-11-20T11:26:57Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![SheetalRIL](https://avatars.discourse-cdn.com/v4/letter/s/13edae/32.png) [@SheetalRIL](https://discuss.elastic.co/u/SheetalRIL)\
**Post date:** [November 20, 2019, 11:26am UTC](https://discuss.elastic.co/t/my-index-is-giving-shard-error/208681/1 "2019-11-20T11:26:57Z")

</div>

Whenever I try to make a filter field my index is giving shard failed error. Where 'labels.is\_error' is a Boolean field with true and false as its 2 answers.  
The filter field is -  
doc['labels.is\_error'].value == true ? 1 : 0  
in number percentage but it gives me error each time.

 ![Screenshot%20(25)](https://us1.discourse-cdn.com/elastic/original/3X/c/5/c516aabd6c842fb40cba3ded7a646840c855276d.png)

---

<div class="post-metadata">

**Author:** ![bhavyarm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bhavyarm/32/22392_2.png) [@bhavyarm](https://discuss.elastic.co/u/bhavyarm)\
**Post date:** [November 20, 2019, 2:20pm UTC](https://discuss.elastic.co/t/my-index-is-giving-shard-error/208681/2 "2019-11-20T14:20:29Z")

</div>

Hi Sheetal,

Are you using scripted fields as your filter in discover?

Thanks,  
Bhavya

---

<div class="post-metadata">

**Author:** ![SheetalRIL](https://avatars.discourse-cdn.com/v4/letter/s/13edae/32.png) [@SheetalRIL](https://discuss.elastic.co/u/SheetalRIL)\
**Post date:** [November 21, 2019, 4:53am UTC](https://discuss.elastic.co/t/my-index-is-giving-shard-error/208681/3 "2019-11-21T04:53:31Z")

</div>

No, I am not using it anywhere as of now

---

<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:** [December 19, 2019, 4:53am UTC](https://discuss.elastic.co/t/my-index-is-giving-shard-error/208681/4 "2019-12-19T04:53:43Z")

</div>

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