GSA / code-gov-adapters

A collection of adapters for Code.gov
Creative Commons Zero v1.0 Universal
0 stars 3 forks source link

Search Results when using an Auto-populated Term do not produce desired search result #4

Open AminPIC opened 5 years ago

AminPIC commented 5 years ago

Describe the bug When you begin to type in the search term "OGE: Form 450" in the homepage search bar, and instead of completing the typing of that term, you select the auto-populated term and click search, the results are not the same as when you enter the term verbatim without selecting the auto-populated term.

To Reproduce Steps to reproduce the behavior:

  1. Go to 'www.code.gov'
  2. Click on 'the search bar'
  3. Begin to enter 'OGE' (the rest of the term should auto-populate below
  4. Select the auto-populate term and press enter
  5. See error (no actual result from that term)

Expected behavior

  1. Go to 'www.code.gov'
  2. Click on 'the search bar'
  3. Begin to enter 'OGE Form 450' (do not select the auto-populated form) and press enter
  4. See desired result

Screenshots result using auto-populated term result when typing term instead of using auto-populated term

Desktop (please complete the following information):

froi commented 5 years ago

I think I got the issue. It has to do with how we are sorting the results. A possible solution is to sort the results by search score first and then apply any other sorting.

I'll be testing to see if it actually solves the issue.