Merge pull request #11417 from ahocevar/example-search-sort
Fix sort order of examples search results
This commit is contained in:
+1
-1
@@ -72,7 +72,7 @@
|
|||||||
// sort examples, first by number of words matched, then
|
// sort examples, first by number of words matched, then
|
||||||
// by word frequency
|
// by word frequency
|
||||||
examples.sort(function (a, b) {
|
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;
|
return examples;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user