Long-term support for snippet search

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Background

Remove snippet search (#480316) suggested removing snippet search due to the reasons outlined in Future of snippet search (#415494 - closed).

Ownership is a bit fuzzy on snippet search and snippet search does not follow the pattern of other search scopes which left it in the state of not being maintained. One of the issues with this is that for advanced snippet search, the indexing of snippets follows a completely different process than other scopes and it relies directly on the elasticsearch gem which is scheduled to be removed in Remove Elasticsearch ruby gem (&14957)

This issue outlines the work required to continue to support snippet search (UX changes out of scope).

Option 1: Remove advanced snippet search, continue using basic snippet search

  • Remove snippet search from EE SearchService and other places
  • Stop indexing snippets
  • Add migration to remove snippets from the main index
  • Remove snippet proxy classes

Option 2: Move advanced snippet search to use the Advanced Search framework

The work required is essentially to introduce a new search scope:

https://docs.gitlab.com/ee/development/advanced_search/#add-a-new-document-type-to-elasticsearch

Proposal

First validate that basic snippet search works if we want to pursue Option 1. If it does, we can always remove advanced snippet search and add it as a new scope when there's capacity.

Edited by 🤖 GitLab Bot 🤖