Indexing for newly created GroupWiki
What does this MR do and why?
This MR will index any newly created group wikis. When a group wiki gets updated or delete it will reindex all the wikis of that group and all the wikis of all subgroups of that group. I have rearranged each commit nicely with more explanation in the commit body of each commit.
Screenshots or screen recordings
Missing project_id in the screenshot and rid as wiki_group_ shows that this is a group wiki.
How to set up and validate locally
- Make sure the elasticsearch is enabled. Navigate to the elasticsearch settings and make sure the two checkboxes
Elasticsearch indexingandSearch with Elasticsearch enabledunder theAdvanced Searchare enabled. - Make sure the feature flag
maintain_group_wiki_indexis enabled. run the following command in rails console
Feature.enabled :maintain_group_wiki_index
- Create a new GroupWiki
- Make sure it gets available on the elasticsearch with the correct attributes:
curl -XGET "http://localhost:9200/gitlab-development-wikis/_search" -H "kbn-xsrf: reporting" -H "Content-Type: application/json" -d'
{
"query": {
"regexp": {
"rid": "wiki_group_[0-9].*"
}
}
}' | json_pp
- Update the wiki content from the UI and verify again that
contentgets updated in the elastic by running the above command. - Delete the wiki from the UI and verify that the documents get removed from the elastic by running the above command.
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 #336100 (closed)
Edited by Ravi Kumar