Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When searching, exact matches should be suggested first #866

Open
carmenbianca opened this issue Feb 21, 2020 · 1 comment
Open

When searching, exact matches should be suggested first #866

carmenbianca opened this issue Feb 21, 2020 · 1 comment

Comments

@carmenbianca
Copy link

When you type in the search bar, you get a list of suggestions as you type. However, exact matches are sometimes drowned out by non-exact matches. Borrowing the example from #865:

When type "pandoc", and you get:

  • pandoc-pandocker-filters
  • pandoc
  • jekyll-pandoc
  • pandoc-numbering
  • etc...

Pandoc only points to crates.io, however. If I want the PyPI package of the same name, it does not show up. Preferably, exact matches should always be suggested before non-exact matches are suggested.

@sbs2001
Copy link

sbs2001 commented Feb 6, 2021

This is an issue with the clearlydefined api, more precisely https://github.com/clearlydefined/service/blob/324017ef0ccfe73eb9d1593faf777d19b621a216/routes/definitions.js#L37 .

The search bar's typeahead displays suggestions in the order they appear.

To fix this, the api should return the response where the exact match appears first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants