Rank doc aliases lower than equivalently matched items
This commit is contained in:
parent
9b1a30e5e6
commit
b39357bbf3
1 changed files with 7 additions and 0 deletions
|
|
@ -3340,6 +3340,13 @@ class DocSearch {
|
|||
return a - b;
|
||||
}
|
||||
|
||||
// sort doc alias items later
|
||||
a = Number(aaa.item.is_alias === true);
|
||||
b = Number(bbb.item.is_alias === true);
|
||||
if (a !== b) {
|
||||
return a - b;
|
||||
}
|
||||
|
||||
// sort by item name (lexicographically larger goes later)
|
||||
let aw = aaa.word;
|
||||
let bw = bbb.word;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue