npmsearch
npmsearch copied to clipboard
How does npmsearch.com do sorting?
The closest I've been able to get is with sort=rating:desc
http://npmsearch.com/query?q=async&fields=name,description,version,keywords,homepage&size=15&sort=rating:desc, but if you compare the results with http://npmsearch.com/?q=async, the site search returns much better results.
How are searches sorted by the site? Thanks
It seems like keywords are being weighted more than the actual package name?
in server.js
I see the request body is
var body = {
fields: ['name','description','keywords','author','modified','homepage','version','license','rating'],
query: search,
sort: [{'rating' : "desc"}],
highlight: {
fields: {
description : {}
}
}
};
but I'm not seeing the difference still