У меня возникла проблема при запуске этой команды на консоли Rails 5 .
:017 > User.reindex
У меня есть некоторые данные в таблице пользователей
:012 > User.all
User Load (10.3ms) SELECT "users".* FROM "users" LIMIT $1 [["LIMIT", 11]]
=> #<ActiveRecord::Relation [#<User id: 1, email: "test@gmai.com", first_name: "test", last_name: "test", parent_id: nil, created_at: "2019-06-17 05:50:15", updated_at: "2019-06-17 09:27:56", role: "pm_lead", is_approved: true, phone: nil, country_code: nil, initials: nil, theme_code: "#4fa399", profile_pic: nil, is_guest: false, guest_migrated: false, projects_count: 0, is_archived: false, office: nil, department: nil, designation: nil, partner_id: 1>]>
Ошибка упругого поиска:
Elasticsearch::Transport::Transport::Errors::BadRequest: [400] {"error":{"root_cause":[{"type":"mapper_parsing_exception","reason":"Root mapping definition has unsupported parameters: [user : {_routing={}, dynamic_templates=[{string_template={mapping={ignore_above=30000, type=keyword, fields={analyzed={analyzer=searchkick_index, index=true, type=text}}}, match_mapping_type=string, match=*}}], properties={name={ignore_above=30000, type=keyword, fields={analyzed={analyzer=searchkick_index, index=true, type=text}, text_middle={analyzer=searchkick_text_middle_index, index=true, type=text}}}, last_name={ignore_above=30000, type=keyword, fields={analyzed={analyzer=searchkick_index, index=true, type=text}, text_middle={analyzer=searchkick_text_middle_index, index=true, type=text}}}, first_name={ignore_above=30000, type=keyword, fields={analyzed={analyzer=searchkick_index, index=true, type=text}, text_middle={analyzer=searchkick_text_middle_index, index=true, type=text}}}}}]"}],"type":"mapper_parsing_exception","reason":"Failed to parse mapping [_doc]: Root mapping definition has unsupported parameters: [user : {_routing={}, dynamic_templates=[{string_template={mapping={ignore_above=30000, type=keyword, fields={analyzed={analyzer=searchkick_index, index=true, type=text}}}, match_mapping_type=string, match=*}}], properties={name={ignore_above=30000, type=keyword, fields={analyzed={analyzer=searchkick_index, index=true, type=text}, text_middle={analyzer=searchkick_text_middle_index, index=true, type=text}}}, last_name={ignore_above=30000, type=keyword, fields={analyzed={analyzer=searchkick_index, index=true, type=text}, text_middle={analyzer=searchkick_text_middle_index, index=true, type=text}}}, first_name={ignore_above=30000, type=keyword, fields={analyzed={analyzer=searchkick_index, index=true, type=text}, text_middle={analyzer=searchkick_text_middle_index, index=true, type=text}}}}}]","caused_by":{"type":"mapper_parsing_exception","reason":"Root mapping definition has unsupported parameters: [user : {_routing={}, dynamic_templates=[{string_template={mapping={ignore_above=30000, type=keyword, fields={analyzed={analyzer=searchkick_index, index=true, type=text}}}, match_mapping_type=string, match=*}}], properties={name={ignore_above=30000, type=keyword, fields={analyzed={analyzer=searchkick_index, index=true, type=text}, text_middle={analyzer=searchkick_text_middle_index, index=true, type=text}}}, last_name={ignore_above=30000, type=keyword, fields={analyzed={analyzer=searchkick_index, index=true, type=text}, text_middle={analyzer=searchkick_text_middle_index, index=true, type=text}}}, first_name={ignore_above=30000, type=keyword, fields={analyzed={analyzer=searchkick_index, index=true, type=text}, text_middle={analyzer=searchkick_text_middle_index, index=true, type=text}}}}}]"}},"status":400}