Creating GitLab index fails on Elasticsearch 7
Creating an elasticsearch index fails with the error below when running Elasticsearch 7.2.
rake aborted!
Elasticsearch::Transport::Transport::Errors::BadRequest: [400] {"error":{"root_cause":[{"type":"mapper_parsing_exception","reason":"Root mapping definition has unsupported parameters: [doc : {dynamic=strict, properties={note={type=text, index_options=offsets}, iid={type=integer}, commit={type=object, properties={committer={type=object, properties={name={type=text, index_options=offsets}, time={format=basic_date_time_no_millis, type=date}, email={type=text, index_options=offsets}}}, author={type=object, properties={name={type=text, index_options=offsets}, time={format=basic_date_time_no_millis, type=date}, email={type=text, index_options=offsets}}}, id={analyzer=sha_analyzer, type=text, index_options=offsets}, type={type=keyword}, rid={type=keyword}, message={type=text, index_options=offsets}, sha={analyzer=sha_analyzer, type=text, index_options=offsets}}}, created_at={type=date}, description={type=text, index_options=offsets}, type={type=keyword}, title={type=text, index_options=offsets}, content={type=text, index_options=offsets}, source_branch={type=text, index_options=offsets}, path={type=text, index_options=offsets}, archived={type=boolean}, updated_at={type=date}, project_id={type=integer}, wiki_access_level={type=integer}, repository_access_level={type=integer}, last_activity_at={type=date}, visibility_level={type=integer}, id={type=integer}, state={type=text}, merge_requests_access_level={type=integer}, confidential={type=boolean}, assignee_id={type=integer}, noteable_id={type=keyword}, issues_access_level={type=integer}, issue={type=object, properties={author_id={type=integer}, assignee_id={type=integer}, confidential={type=boolean}}}, path_with_namespace={type=text, index_options=offsets}, file_name={type=text, index_options=offsets}, target_branch={type=text, index_options=offsets}, source_project_id={type=integer}, snippets_access_level={type=integer}, join_field={type=join, relations={project=[issue, merge_request, milestone, note, blob, wiki_blob, commit]}}, last_pushed_at={type=date}, blob={type=object, properties={path={analyzer=path_analyzer, type=text}, commit_sha={analyzer=sha_analyzer, type=text, index_options=offsets}, file_name={search_analyzer=code_search_analyzer, analyzer=code_analyzer, type=text}, language={type=keyword}, id={analyzer=sha_analyzer, type=text, index_options=offsets}, oid={analyzer=sha_analyzer, type=text, index_options=offsets}, type={type=keyword}, rid={type=keyword}, content={search_analyzer=code_search_analyzer, analyzer=code_analyzer, type=text, index_options=offsets}}}, namespace_id={type=integer}, merge_status={type=text}, noteable_type={type=keyword}, name={type=text, index_options=offsets}, author_id={type=integer}, target_project_id={type=integer}, name_with_namespace={analyzer=my_ngram_analyzer, type=text, index_options=offsets}}}]"}],"type":"mapper_parsing_exception","reason":"Failed to parse mapping [_doc]: Root mapping definition has unsupported parameters: [doc : {dynamic=strict, properties={note={type=text, index_options=offsets}, iid={type=integer}, commit={type=object, properties={committer={type=object, properties={name={type=text, index_options=offsets}, time={format=basic_date_time_no_millis, type=date}, email={type=text, index_options=offsets}}}, author={type=object, properties={name={type=text, index_options=offsets}, time={format=basic_date_time_no_millis, type=date}, email={type=text, index_options=offsets}}}, id={analyzer=sha_analyzer, type=text, index_options=offsets}, type={type=keyword}, rid={type=keyword}, message={type=text, index_options=offsets}, sha={analyzer=sha_analyzer, type=text, index_options=offsets}}}, created_at={type=date}, description={type=text, index_options=offsets}, type={type=keyword}, title={type=text, index_options=offsets}, content={type=text, index_options=offsets}, source_branch={type=text, index_options=offsets}, path={type=text, index_options=offsets}, archived={type=boolean}, updated_at={type=date}, project_id={type=integer}, wiki_access_level={type=integer}, repository_access_level={type=integer}, last_activity_at={type=date}, visibility_level={type=integer}, id={type=integer}, state={type=text}, merge_requests_access_level={type=integer}, confidential={type=boolean}, assignee_id={type=integer}, noteable_id={type=keyword}, issues_access_level={type=integer}, issue={type=object, properties={author_id={type=integer}, assignee_id={type=integer}, confidential={type=boolean}}}, path_with_namespace={type=text, index_options=offsets}, file_name={type=text, index_options=offsets}, target_branch={type=text, index_options=offsets}, source_project_id={type=integer}, snippets_access_level={type=integer}, join_field={type=join, relations={project=[issue, merge_request, milestone, note, blob, wiki_blob, commit]}}, last_pushed_at={type=date}, blob={type=object, properties={path={analyzer=path_analyzer, type=text}, commit_sha={analyzer=sha_analyzer, type=text, index_options=offsets}, file_name={search_analyzer=code_search_analyzer, analyzer=code_analyzer, type=text}, language={type=keyword}, id={analyzer=sha_analyzer, type=text, index_options=offsets}, oid={analyzer=sha_analyzer, type=text, index_options=offsets}, type={type=keyword}, rid={type=keyword}, content={search_analyzer=code_search_analyzer, analyzer=code_analyzer, type=text, index_options=offsets}}}, namespace_id={type=integer}, merge_status={type=text}, noteable_type={type=keyword}, name={type=text, index_options=offsets}, author_id={type=integer}, target_project_id={type=integer}, name_with_namespace={analyzer=my_ngram_analyzer, type=text, index_options=offsets}}}]","caused_by":{"type":"mapper_parsing_exception","reason":"Root mapping definition has unsupported parameters: [doc : {dynamic=strict, properties={note={type=text, index_options=offsets}, iid={type=integer}, commit={type=object, properties={committer={type=object, properties={name={type=text, index_options=offsets}, time={format=basic_date_time_no_millis, type=date}, email={type=text, index_options=offsets}}}, author={type=object, properties={name={type=text, index_options=offsets}, time={format=basic_date_time_no_millis, type=date}, email={type=text, index_options=offsets}}}, id={analyzer=sha_analyzer, type=text, index_options=offsets}, type={type=keyword}, rid={type=keyword}, message={type=text, index_options=offsets}, sha={analyzer=sha_analyzer, type=text, index_options=offsets}}}, created_at={type=date}, description={type=text, index_options=offsets}, type={type=keyword}, title={type=text, index_options=offsets}, content={type=text, index_options=offsets}, source_branch={type=text, index_options=offsets}, path={type=text, index_options=offsets}, archived={type=boolean}, updated_at={type=date}, project_id={type=integer}, wiki_access_level={type=integer}, repository_access_level={type=integer}, last_activity_at={type=date}, visibility_level={type=integer}, id={type=integer}, state={type=text}, merge_requests_access_level={type=integer}, confidential={type=boolean}, assignee_id={type=integer}, noteable_id={type=keyword}, issues_access_level={type=integer}, issue={type=object, properties={author_id={type=integer}, assignee_id={type=integer}, confidential={type=boolean}}}, path_with_namespace={type=text, index_options=offsets}, file_name={type=text, index_options=offsets}, target_branch={type=text, index_options=offsets}, source_project_id={type=integer}, snippets_access_level={type=integer}, join_field={type=join, relations={project=[issue, merge_request, milestone, note, blob, wiki_blob, commit]}}, last_pushed_at={type=date}, blob={type=object, properties={path={analyzer=path_analyzer, type=text}, commit_sha={analyzer=sha_analyzer, type=text, index_options=offsets}, file_name={search_analyzer=code_search_analyzer, analyzer=code_analyzer, type=text}, language={type=keyword}, id={analyzer=sha_analyzer, type=text, index_options=offsets}, oid={analyzer=sha_analyzer, type=text, index_options=offsets}, type={type=keyword}, rid={type=keyword}, content={search_analyzer=code_search_analyzer, analyzer=code_analyzer, type=text, index_options=offsets}}}, namespace_id={type=integer}, merge_status={type=text}, noteable_type={type=keyword}, name={type=text, index_options=offsets}, author_id={type=integer}, target_project_id={type=integer}, name_with_namespace={analyzer=my_ngram_analyzer, type=text, index_options=offsets}}}]"}},"status":400}
/opt/gitlab/embedded/service/gitlab-rails/ee/lib/gitlab/elastic/helper.rb:37:in `create_empty_index'
/opt/gitlab/embedded/service/gitlab-rails/ee/lib/tasks/gitlab/elastic.rake:104:in `block (3 levels) in <top (required)>'
/opt/gitlab/embedded/service/gitlab-rails/ee/lib/tasks/gitlab/elastic.rake:10:in `block (3 levels) in <top (required)>'
/opt/gitlab/embedded/bin/bundle:23:in `load'
/opt/gitlab/embedded/bin/bundle:23:in `<main>'
Tasks: TOP => gitlab:elastic:create_empty_index
Edited by Chenjerai Katanda