diff --git a/src/layouts/partials/package-grid.html b/src/layouts/partials/package-grid.html index 586c2da..85c1396 100644 --- a/src/layouts/partials/package-grid.html +++ b/src/layouts/partials/package-grid.html @@ -209,8 +209,8 @@ function getMatchScore(term, dataset) { // provide higher value with name - const { name, description } = dataset; - const exactMatch = name.toLocaleLowerCase().includes(term.toLocaleLowerCase()); + const { name, maintainer, description } = dataset; + const exactMatch = [maintainer, name].join(" ").toLocaleLowerCase().includes(term.toLocaleLowerCase()); const nameScore = stringSimilarity.compareTwoStrings(name, term); const descriptionScore = stringSimilarity.compareTwoStrings(description, term); return (nameScore*80) + (descriptionScore*20) + (exactMatch ? 100 : 0);