# Search error on upgrade to 5.1.2

**URL:** <https://discuss.elastic.co/t/search-error-on-upgrade-to-5-1-2/79095>\
**Category:** Kibana\
**Created:** [March 17, 2017, 8:53pm UTC](https://discuss.elastic.co/t/search-error-on-upgrade-to-5-1-2/79095 "2017-03-17T20:53:57Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![eperry](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/eperry/32/551_2.png) [@eperry](https://discuss.elastic.co/u/eperry)\
**Post date:** [March 17, 2017, 8:53pm UTC](https://discuss.elastic.co/t/search-error-on-upgrade-to-5-1-2/79095/1 "2017-03-17T20:53:57Z")

</div>

Upgrading from  
Kibana from 4.5.4  
Upgrade to 5.1.2

I exported the search via Kibana 4.5 and imported the json file through 5.1.2 and now the search does not work. Looking for suggestions on what to fix. I don't see anything in the breaking changes for 5.0 that would explain why this breaks

In red at the top of the screen:

> Discover: [parsing\_exception] no [query] registered for [query], with { line=1 & col=110 }

here is the more info on the error

> Error: [parsing\_exception] no [query] registered for [query], with { line=1 & col=110 }  
> at respond ([http://qa-dashboard.digital.hbc.com/kibana/bundles/kibana.bundle.js?v=14588:14:6928](http://qa-dashboard.digital.hbc.com/kibana/bundles/kibana.bundle.js?v=14588:14:6928))  
> at checkRespForFailure ([http://qa-dashboard.digital.hbc.com/kibana/bundles/kibana.bundle.js?v=14588:14:6156](http://qa-dashboard.digital.hbc.com/kibana/bundles/kibana.bundle.js?v=14588:14:6156))  
> at [http://qa-dashboard.digital.hbc.com/kibana/bundles/kibana.bundle.js?v=14588:1:23690](http://qa-dashboard.digital.hbc.com/kibana/bundles/kibana.bundle.js?v=14588:1:23690)  
> at processQueue ([http://qa-dashboard.digital.hbc.com/kibana/bundles/commons.bundle.js?v=14588:38:23621](http://qa-dashboard.digital.hbc.com/kibana/bundles/commons.bundle.js?v=14588:38:23621))  
> at [http://qa-dashboard.digital.hbc.com/kibana/bundles/commons.bundle.js?v=14588:38:23888](http://qa-dashboard.digital.hbc.com/kibana/bundles/commons.bundle.js?v=14588:38:23888)  
> at Scope.$eval ([http://qa-dashboard.digital.hbc.com/kibana/bundles/commons.bundle.js?v=14588:39:4619](http://qa-dashboard.digital.hbc.com/kibana/bundles/commons.bundle.js?v=14588:39:4619))  
> at Scope.$digest ([http://qa-dashboard.digital.hbc.com/kibana/bundles/commons.bundle.js?v=14588:39:2359](http://qa-dashboard.digital.hbc.com/kibana/bundles/commons.bundle.js?v=14588:39:2359))  
> at Scope.$apply ([http://qa-dashboard.digital.hbc.com/kibana/bundles/commons.bundle.js?v=14588:39:5037](http://qa-dashboard.digital.hbc.com/kibana/bundles/commons.bundle.js?v=14588:39:5037))  
> at done ([http://qa-dashboard.digital.hbc.com/kibana/bundles/commons.bundle.js?v=14588:37:25027](http://qa-dashboard.digital.hbc.com/kibana/bundles/commons.bundle.js?v=14588:37:25027))  
> at completeRequest ([http://qa-dashboard.digital.hbc.com/kibana/bundles/commons.bundle.js?v=14588:37:28702](http://qa-dashboard.digital.hbc.com/kibana/bundles/commons.bundle.js?v=14588:37:28702))

![](https://us1.discourse-cdn.com/elastic/original/3X/e/d/ed0bcf42b9997715acfb985e9c7f17601342ae4a.png)

here is what the object looks like , when exported out of kibana (No errors on import)

> [  
> {  
> "\_id": "o5a-qa-account-services",  
> "\_type": "search",  
> "\_source": {  
> "title": "o5a-qa-account-services",  
> "description": "",  
> "hits": 0,  
> "columns": [  
> "correlation-id",  
> "service",  
> "level",  
> "msg"  
> ],  
> "sort": [  
> "@timestamp",  
> "desc"  
> ],  
> "version": 1,  
> "kibanaSavedObjectMeta": {  
> "searchSourceJSON": "{"index":"o5a\_qa-_","query":{"query\_string":{"analyze\_wildcard":true,"query":"_"}},"filter":[{"$state":{"store":"appState"},"bool":{"should":[{"query":{"match":{"service":{"query":"blue-martini-service","type":"phrase"}}}},{"query":{"match":{"service":{"query":"user-account-service","type":"phrase"}}}},{"query":{"match":{"service":{"query":"user-authentication-service","type":"phrase"}}}},{"query":{"match":{"service":{"query":"account-service","type":"phrase"}}}},{"query":{"match":{"service":{"query":"order-service","type":"phrase"}}}},{"query":{"match":{"service":{"query":"address-service","type":"phrase"}}}},{"query":{"match":{"service":{"query":"payment-method-service","type":"phrase"}}}}]},"meta":{"alias":null,"disabled":false,"index":"o5a\_qa-_","key":"bool","negate":false,"value":"{\"should\":[{\"query\":{\"match\":{\"service\":{\"query\":\"blue-martini-service\",\"type\":\"phrase\"}}}},{\"query\":{\"match\":{\"service\":{\"query\":\"user-account-service\",\"type\":\"phrase\"}}}},{\"query\":{\"match\":{\"service\":{\"query\":\"user-authentication-service\",\"type\":\"phrase\"}}}},{\"query\":{\"match\":{\"service\":{\"query\":\"account-service\",\"type\":\"phrase\"}}}},{\"query\":{\"match\":{\"service\":{\"query\":\"order-service\",\"type\":\"phrase\"}}}},{\"query\":{\"match\":{\"service\":{\"query\":\"address-service\",\"type\":\"phrase\"}}}},{\"query\":{\"match\":{\"service\":{\"query\":\"payment-method-service\",\"type\":\"phrase\"}}}}]}"}},{"$state":{"store":"appState"},"meta":{"alias":null,"disabled":false,"index":"o5a\_qa-_","key":"tags","negate":true,"value":"time\_log"},"query":{"match":{"tags":{"query":"time\_log","type":"phrase"}}}}],"highlight":{"pre\_tags":["@kibana-highlighted-field@"],"post\_tags":["@/kibana-highlighted-field@"],"fields":{"\*":{}},"require\_field\_match":false,"fragment\_size":2147483647}}"  
> }  
> }  
> }  
> ]

---

<div class="post-metadata">

**Author:** ![Marius\_Dragomir](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marius_dragomir/32/42087_2.png) [@Marius\_Dragomir](https://discuss.elastic.co/u/Marius_Dragomir)\
**Post date:** [March 22, 2017, 2:23pm UTC](https://discuss.elastic.co/t/search-error-on-upgrade-to-5-1-2/79095/2 "2017-03-22T14:23:28Z")

</div>

My guess is that this might have something to do with the changes to the queries in 5.x  
[https://www.elastic.co/guide/en/elasticsearch/reference/current/breaking\_50\_search\_changes.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/breaking_50_search_changes.html)  
Easiest way to see what's changed (because that's a very big list there) is to recreate the query in 5.x and compare the two exported objects.

---

<div class="post-metadata">

**Author:** ![eperry](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/eperry/32/551_2.png) [@eperry](https://discuss.elastic.co/u/eperry)\
**Post date:** [March 22, 2017, 3:23pm UTC](https://discuss.elastic.co/t/search-error-on-upgrade-to-5-1-2/79095/3 "2017-03-22T15:23:04Z")

</div>

yah it seems the issue is with the "Filter" but don't understand what is wrong with it , I'll try to recreate it but we have a lot of pages with filters, I would hate to have to fix ever single one.

There should not have been breaking changes between a 5.1 and 5.2 release. Deprecated sure but not removed. it has me really annoyed.

---

<div class="post-metadata">

**Author:** ![Marius\_Dragomir](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marius_dragomir/32/42087_2.png) [@Marius\_Dragomir](https://discuss.elastic.co/u/Marius_Dragomir)\
**Post date:** [March 22, 2017, 3:43pm UTC](https://discuss.elastic.co/t/search-error-on-upgrade-to-5-1-2/79095/4 "2017-03-22T15:43:11Z")

</div>

That's the list of breaking changes between 4.x and 5.y not between 5.1 and 5.2. That's the situation that I got from your initial post.

---

<div class="post-metadata">

**Author:** ![Bargs](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bargs/32/5429_2.png) [@Bargs](https://discuss.elastic.co/u/Bargs)\
**Post date:** [March 22, 2017, 3:53pm UTC](https://discuss.elastic.co/t/search-error-on-upgrade-to-5-1-2/79095/5 "2017-03-22T15:53:47Z")

</div>

The issue is specifically with the custom `bool` filter you have. Each sub-query of the bool starts with a `query` object, which is no longer valid. You'll need to remove the `query` wrapper around each sub query so it looks like the syntax here [https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-bool-query.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-bool-query.html).

We do this transformation automatically on filters created via the UI but we can't do it for custom filters.

---

<div class="post-metadata">

**Author:** ![eperry](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/eperry/32/551_2.png) [@eperry](https://discuss.elastic.co/u/eperry)\
**Post date:** [March 22, 2017, 4:58pm UTC](https://discuss.elastic.co/t/search-error-on-upgrade-to-5-1-2/79095/6 "2017-03-22T16:58:47Z")

</div>

yah sort of been coming to that solution, been helping another internal app with a broken query fix a similar issue related to his queries.

I will see about testing this out tomorrow and will let you know.

THANKS!

Oh yah it was between 4.5 -\> 5.2 I had another issue with Sort going from 5.1 to 5.2 got the issues confused. Have to get back to the solution for why my sort statement is broken. but I need to read about that before I raise the question to the community

---

<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:** [April 19, 2017, 4:58pm UTC](https://discuss.elastic.co/t/search-error-on-upgrade-to-5-1-2/79095/7 "2017-04-19T16:58:52Z")

</div>

Closed on April 19, 2017, 4:58pm UTC

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