# Error on discover

**URL:** <https://discuss.elastic.co/t/error-on-discover/214906>\
**Category:** Kibana\
**Created:** [January 13, 2020, 9:33pm UTC](https://discuss.elastic.co/t/error-on-discover/214906 "2020-01-13T21:33:45Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![vitornogueira](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vitornogueira/32/60736_2.png) [@vitornogueira](https://discuss.elastic.co/u/vitornogueira)\
**Post date:** [January 13, 2020, 9:33pm UTC](https://discuss.elastic.co/t/error-on-discover/214906/1 "2020-01-13T21:33:46Z")

</div>

When I access the Discover screen the following error appears:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/2/2/22a0f8595eb21f4e10f8356379a18831c25055f2.png)

I ran the following command to rebuild the index pattern apm- \*:

```
apm-server setup

```

Kibana version: 7.5

---

<div class="post-metadata">

**Author:** ![mattkime](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mattkime/32/43522_2.png) [@mattkime](https://discuss.elastic.co/u/mattkime)\
**Post date:** [January 14, 2020, 1:59am UTC](https://discuss.elastic.co/t/error-on-discover/214906/2 "2020-01-14T01:59:39Z")

</div>

@vitornogueira It looks like there's a scripted field that is causing the problem, specifically `doc['context.service.name']` - have you tried addressing that? If the field is unused, perhaps you can simply deleted it and try again.

---

<div class="post-metadata">

**Author:** ![vitornogueira](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vitornogueira/32/60736_2.png) [@vitornogueira](https://discuss.elastic.co/u/vitornogueira)\
**Post date:** [January 14, 2020, 1:01pm UTC](https://discuss.elastic.co/t/error-on-discover/214906/3 "2020-01-14T13:01:32Z")

</div>

Hi @mattkime

I deleted all data from elastic search, our software services sent new data and the problem continued. We are using the default ELK stack settings, we have not made any modifications yet.

We are considering rebuilding Index Pattern apm- \* to see if we have solved the problem.

We previously used version 6.x and the discover screen functioned normally.

---

<div class="post-metadata">

**Author:** ![mattkime](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mattkime/32/43522_2.png) [@mattkime](https://discuss.elastic.co/u/mattkime)\
**Post date:** [January 14, 2020, 1:51pm UTC](https://discuss.elastic.co/t/error-on-discover/214906/4 "2020-01-14T13:51:22Z")

</div>

Have you checked for the presence of scripted fields?

---

<div class="post-metadata">

**Author:** ![vitornogueira](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vitornogueira/32/60736_2.png) [@vitornogueira](https://discuss.elastic.co/u/vitornogueira)\
**Post date:** [January 14, 2020, 8:05pm UTC](https://discuss.elastic.co/t/error-on-discover/214906/5 "2020-01-14T20:05:52Z")

</div>

Yes, scripted fields were ok.

We rebuilt the Index Pattern (we deleted and created again) and it went back to work.

Thank you for your help!

---

<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:** [February 11, 2020, 8:05pm UTC](https://discuss.elastic.co/t/error-on-discover/214906/6 "2020-02-11T20:05:58Z")

</div>

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