Labels as a facet: Index labels for Issues
What does this MR do and why?
This MR introduces 2 new Advanced Search migrations in order to add label_ids
to the gitlab-production-issues
index:
AddLabelIdsToIssuesMapping
BackfillLabelIdsForIssues
It utilizes existing helpers from Elastic::MigrationUpdateMappingsHelper
and Elastic::MigrationBackfillHelper
to make it as painless as possible.
The new label_ids
field is a keyword one, which is intended to store an array of label ids.
New schema_version field
Also, this MR includes a new short
field called schema_version
. This is used in this MR to circumvent the problem with the exist query and to simplify future schema migrations.
Expected runtime of the migration
We have 12.6M documents in our gitlab-production-issues
index, so with batch_size 5000
and throttle_delay 3.minutes
it will take ((12600000/5000)*3)/60 = 126 hours
, which should be ok since we don't pause indexing.
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #369539 (closed)