Update index options for global search in Elasticsearch
C3
Production Change - Criticality 3Change Objective | Describe the objective of the change |
---|---|
Change Type | ConfigurationChange |
Services Impacted | Elasticsearch global search cluster |
Change Team Members | @DylanGriffith |
Change Severity | C3 |
Change Reviewer or tested in staging | Will be tested on staging first |
Dry-run output | |
Due Date | 2020-03-18 02:00 UTC |
Time tracking |
Prep
-
Perform all change steps on staging
Detailed steps for the change
-
Ping SRE on call in #production
:@sre-oncall we are about to make this minor Elasticsearch settings change for the global search cluster prod-gitlab-com indexing https://gitlab.com/gitlab-com/gl-infra/production/-/issues/1758. This is unlikely to impact any other settings but will ideally reduce load on the cluster and slightly reduce storage used over time.
-
Make the settings change with the following request to the cluster curl -H 'Content-Type: application/json' -XPUT "$ES_CLUSTER_HOST/gitlab-production/_mapping" -d '{ "properties": { "blob": { "properties": { "content": { "type": "text", "index_options": "positions", "analyzer": "code_analyzer", "search_analyzer": "code_search_analyzer" } } } } }'
-
Create a new file in any indexed project -
Search for the newly created file and validate that it appears in the search results (may take a couple of minutes for the indexing job to complete)
Rollback steps
-
Make the settings change with the following request to the cluster curl -H 'Content-Type: application/json' -XPUT "$ES_CLUSTER_HOST/gitlab-production/_mapping" -d '{ "properties": { "blob": { "properties": { "content": { "type": "text", "index_options": "offsets", "analyzer": "code_analyzer", "search_analyzer": "code_search_analyzer" } } } } }'
-
Create a new file any indexed project -
Search for the newly created file and validate that it appears in the search results (may take a couple of minutes for the indexing job to complete)
Changes checklist
-
Detailed steps and rollback steps have been filled prior to commencing work -
Person on-call has been informed prior to change being rolled out