Fix sort order of examples search results

This commit is contained in:
Andreas Hocevar
2020-08-09 21:23:13 +02:00
parent 82328fe2c1
commit d9fb969765

View File

@@ -72,7 +72,7 @@
// sort examples, first by number of words matched, then
// by word frequency
examples.sort(function (a, b) {
return a.score - b.score || a.words - b.words;
return b.score - a.score || b.words - a.words;
});
return examples;
}