conan-io / web

Conan website, including home and ConanCenter
MIT License
10 stars 10 forks source link

Display full search matches first #85

Closed AbrilRBS closed 1 year ago

AbrilRBS commented 1 year ago

When searching for a recipe, it would be great if the recipe that fully matches the name is displayed first, ie, have glib placed first here: Captura de pantalla 2023-08-17 a las 14 06 01

acano15 commented 1 year ago

It may be a superficial observation, yet I appreciated the feature in the previous version where it offered suggestions while typing. This feature proves valuable for lengthy or intricate library names, and it aids in the discovery of new libraries as well.

prince-chrismc commented 1 year ago

There is a standard algorithm for this

the Levenshtein distance is a string metric for measuring the difference between two sequences.

https://stackoverflow.com/a/64932433/8480874

https://medium.com/@ethannam/understanding-the-levenshtein-distance-equation-for-beginners-c4285a5604f0