Elasticsearch query returns incorrect highlight
Summary
When searching for the string cvss on gitlab.com/gitlab-org the wrong string was highlighted. The search string is actually present within the file but the highlighted portion did not match and the search preview did not include that portion of the string
Steps to reproduce
- Search https://gitlab.com/search?group_id=2564205&project_id=&repository_ref=&scope=blobs&search=cvss
- File in question: https://gitlab.com/gitlab-org/security-products/analyzers/spotbugs/raw/5637cfb1383375ea0c3912d41d22d45d4e09d7e6/test/fixtures/grails-project/grails-app/assets/javascripts/bootstrap.bundle.min.js.map
Example Project
See above, this bug happens on gitlab.com
What is the current bug behavior?
Incorrect string is highlighted/displayed
What is the expected correct behavior?
Search string is highlighted/displayed
Relevant logs and/or screenshots
Output of checks
This bug happens on GitLab.com
Results of GitLab environment info
Expand for output related to GitLab environment info
(For installations with omnibus-gitlab package run and paste the output of:
sudo gitlab-rake gitlab:env:info)(For installations from source run and paste the output of:
sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production)
Results of GitLab application Check
Expand for output related to the GitLab application check
(For installations with omnibus-gitlab package run and paste the output of:
sudo gitlab-rake gitlab:check SANITIZE=true)(For installations from source run and paste the output of:
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true)(we will only investigate if the tests are passing)
Possible fixes
(If you can, link to the line of code that might be responsible for the problem)
