You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was upgrading rails from 6 to 6.1 and ruby from 2.6.7 to 3. In the same time I upgraded chewy from 5.0.0 to 6.0 and elasticsearch from 5 to 6. But, I didn't upgrade Elasticsearch Server which is already running on 5.6.16-alpine.
In my project we are using define_types at many places. So, when I look for search query I am getting this error:
[400] {"error":{"root_cause":[{"type":"parsing_exception","reason":"Unknown key for a START_ARRAY in [index].","line":1,"col":10}],"type":"parsing_exception","reason":"Unknown key for a START_ARRAY in [index].","line":1,"col":10},"status":400}
Expected behavior
It should work as before. Is should return indexed object in right manner.
Actual behavior
It was returning error: [400] {"error":{"root_cause":[{"type":"parsing_exception","reason":"Unknown key for a START_ARRAY in [index].","line":1,"col":10}],"type":"parsing_exception","reason":"Unknown key for a START_ARRAY in [index].","line":1,"col":10},"status":400}.
When I observed I found here is some change in Index object like: Before <Dub::Index::OrganisationEntityIndex::Query {:index=>["organisation_entity"], :type=>["organisation_entity"], :body=>{:sort=>[{"_script"=>{:script=>{:file=>"group-account", :lang=>"painless", :params=>{:group_id=>1}}, :type=>"number", :order=>"desc"}}, {"primary_sort"=>:asc}], :size=>20, :from=>0, :query=>{:bool=>{:filter=>[{:terms=>{"belongs_to_group_id"=>[1]}}, {:term=>{:join_field=>"account"}}]}}}, :search_type=>"dfs_query_then_fetch"}>
I was upgrading rails from 6 to 6.1 and ruby from 2.6.7 to 3. In the same time I upgraded chewy from 5.0.0 to 6.0 and elasticsearch from 5 to 6. But, I didn't upgrade Elasticsearch Server which is already running on 5.6.16-alpine.
In my project we are using define_types at many places. So, when I look for search query I am getting this error:
[400] {"error":{"root_cause":[{"type":"parsing_exception","reason":"Unknown key for a START_ARRAY in [index].","line":1,"col":10}],"type":"parsing_exception","reason":"Unknown key for a START_ARRAY in [index].","line":1,"col":10},"status":400}
Expected behavior
It should work as before. Is should return indexed object in right manner.
Actual behavior
It was returning error:
[400] {"error":{"root_cause":[{"type":"parsing_exception","reason":"Unknown key for a START_ARRAY in [index].","line":1,"col":10}],"type":"parsing_exception","reason":"Unknown key for a START_ARRAY in [index].","line":1,"col":10},"status":400}
.When I observed I found here is some change in Index object like:
Before
<Dub::Index::OrganisationEntityIndex::Query {:index=>["organisation_entity"], :type=>["organisation_entity"], :body=>{:sort=>[{"_script"=>{:script=>{:file=>"group-account", :lang=>"painless", :params=>{:group_id=>1}}, :type=>"number", :order=>"desc"}}, {"primary_sort"=>:asc}], :size=>20, :from=>0, :query=>{:bool=>{:filter=>[{:terms=>{"belongs_to_group_id"=>[1]}}, {:term=>{:join_field=>"account"}}]}}}, :search_type=>"dfs_query_then_fetch"}>
After
<Dub::Index::OrganisationEntityIndex::Query {:body=>{:index=>["organisation_entity"], :type=>["organisation_entity"], :sort=>[{"_script"=>{:script=>{:file=>"group-account", :lang=>"painless", :params=>{:group_id=>1}}, :type=>"number", :order=>"desc"}}, {"primary_sort"=>:asc}], :size=>20, :from=>0, :query=>{:bool=>{:filter=>[{:terms=>{"belongs_to_group_id"=>[1]}}, {:term=>{:join_field=>"account"}}]}}}, :search_type=>"dfs_query_then_fetch"}>
Version Information
Share here essential version information such as:
5.2
gem version 5.0.5 server version 5.6.16
3.0.0
6.1
The text was updated successfully, but these errors were encountered: