Search field in project page and in search results page have completely different behaviors

Summary

I am trying to refine (fix a typo, actually) search results, but instead I get a completely different search, and a misleading "We couldn't find any results matching …" message.

Steps to reproduce

  1. Go to https://gitlab.com/gitlab-org/gitlab-ce
  2. Type project owne in the search field and hit Enter
  3. In the search results page, notice that you've hit Enter before typing the trailing r
  4. Click on the search field, type the missing r so that the search term is now project owner, and hit Enter

What is the current bug behavior?

The search results page says "Zero search results". Actually, the same page reports zero Projects results, but 107 Issues and 8 Merge requests.

Screen_Shot_2017-03-28_at_6.19.50_PM

What is the expected correct behavior?

This results page with 46 Code results, 63 Issues, 7 Merge Requests, etc:

Screen_Shot_2017-03-28_at_6.17.00_PM

Besides, the "We couldn't find any results matching project owner message is misleading. It couldn't find any projects matching project owner, but it did find Issues and Merge Requests containing this search term. It should say "We couldn't find any projects matching project owner" instead.

Relevant logs and/or screenshots

Screenshots above.

Output of checks

This bug happens on GitLab.com

Results of GitLab environment info

This bug happens on GitLab.com

Results of GitLab application Check

This bug happens on GitLab.com

Possible fixes

N/A

Assignee Loading
Time tracking Loading