404 error from the search controller when the elasticsearch index is out of date
https://gitlab.com/gitlab-org/gitlab-ee/blob/v10.4.4-ee/app/helpers/search_helper.rb#L45
called from https://gitlab.com/gitlab-org/gitlab-ee/blob/v10.4.4-ee/app/views/search/results/_blob.html.haml#L1
(called from _results.html.haml, called from show.html.haml, called from app/controllers/search_controller.rb)
When the elasticsearch index is out of date, we may return a blob (or issue, or any other item) with a _parent
referring to a project that has been removed. In these cases, the entire page returns a 404 error.
Instead, we should simply omit that item from the search results.
/cc @victorwu @smcgivern
Edited by Nick Thomas