Skip to content

Add archived field in the wikis index

Ravi Kumar requested to merge 416248-migration-add-archived-in-wikis into master

What does this MR do and why?

This MR will add a boolean field archived in the wikis index mapping. This field can be used to hide archived projects' wikis from the search result.

Screenshots or screen recordings

Screenshot_2023-07-12_at_14.09.12

How to set up and validate locally

  1. Open the rails console
bundle exec rails c
  1. Run the following commands
require_relative 'ee/elastic/migrate/20230719211400_add_archived_to_wikis.rb' 
AddArchivedToWikis.new(20230719211400).migrate
  1. Check the mapping of the commits index
curl -H 'Content-type: application/json' -XGET 'http://localhost:9200/gitlab-development-wikis/_mappings' | json_pp
  1. Make sure there is a field archived with type as boolean is present

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #416248 (closed)

Edited by Ravi Kumar

Merge request reports

Loading