Closed amilajack closed 8 years ago
At the moment, sorting is done using a mix of relevance+quality+popularity+maintenance. All these factors are being take into account.
You may specify the weights of each of these factors as query parameters, see: https://github.com/npms-io/npms-api/blob/master/lib/controllers/search.js#L32. Default values are here: https://github.com/npms-io/npms-api/blob/master/config/default.json5#L10
Is that sufficient for you?
I've realized that the repo's are not sorted by the score number (I think). But I realized later that the current sorting method suits my needs. Thanks! But one of the things that i've noticed about noms.io is that some of the packages lead to a 404 (probably because they've been deleted). Wonder if npms.io could check monthly or so whether the repos still exist
Here's one example of when the search doesn't work properly:
Exact matches always appear first for now, but that might change.
Regarding the repositories, modules are always re-analyzed each 15 days but I guess I'm not deleting the repo link if it is unavailable. Could you create a separate issue for this (in the npms-analyzer)?
Thanks
Just a heads up regarding the advanced query params: the names will soon change, as well as the response body. You may "preview" how they will look like in https://api-docs.npms.io/#api-module-get_info and you may follow the merge + deploy process in #36
Got it. Thanks!
@satazor The first link you mentioned on Jul 3 is a 404. Can you repost the URL?
I've updated my comment, thanks for the heads up.
Support for sorting search results by quality or popularity by default would be a nice addition to the noms-api. It will encourage people to make their packages better in order to appear higher in results.