Elasticsearch filename attribute contains full path - consider changing to proper filename

Summary

Currently we add the full path to our blobs that get indexed inside elasticsearch despite having a ElasticSearch::GitLab::LiteBlob#name method that extracts the filename for us. This causes filename filter to be broken to our users (see https://gitlab.com/gitlab-org/gitlab-ee/issues/7408)

We should probably fix this, but I wanted to make sure there wasn't a reason for this first

cc/ @nick.thomas as it seems this came from a gem we imported?

Proposal

Pass the file's basename in the filename attribute. Keep the full path in the path attribute.

See indexer/blob.go in gitlab-elasticsearch-indexer.

Testing

Make sure searching by full/partial paths still works, as before.

Edited by Markus Koller