Add a rake task to create a new ElasticSearch index
As per #213918 (comment 321422482)
So you really need the new index to be created with the settings/mappings from GitLab itself. The way I did it was a dirty hack where I just commented out [this line in a spec](https://gitlab.com/gitlab- org/gitlab/-/blob/c4030e8e/ee/spec/lib/ee/gitlab/elastic/helper_spec.rb#L27) and run the test and webmock errors out spitting out the full request it made to create the index. The only change I needed to make to the
JSON
was to change the number of shards to match our production setting (30).
We should have a way to create an ElasticSearch index with the proper settings with a rake task.
Proposal
Take a look at the current rake gitlab:elastic:create_empty_index
task to see if I could leverage it to create the index with a parameterized name.
Next steps
Document how to use it in #213918 (closed)
Related to #213918 (closed)