more power to title exact match

This commit is contained in:
Luis Fernando Molina committed 2020-12-17 17:49:02 +01:00
1 parent 58ea7d72f8
commit 94abfc18da
1 file changed
+15
@@ -308,6 +308,13 @@ function newSuperalgosDocSpace() {
return
}
if (documentIndex.document.type !== undefined) {
let paragraph = {
style: 'Type',
text: documentIndex.document.type
}
indexParagraph(paragraph)
}
if (documentIndex.document.definition !== undefined) {
let paragraph = {
style: 'Definition',
@@ -663,7 +670,15 @@ function newSuperalgosDocSpace() {
if (thisPhraseCount === undefined) {
thisPhraseCount = 0
}
if (searchPhrase.toLowerCase() === documentIndex.document.type.toLowerCase()) {
documentPoints = documentPoints + thisPhraseCount * 100
}
switch (style) {
case 'type': {
documentPoints = documentPoints + thisPhraseCount * 50
break
}
case 'definition': {
documentPoints = documentPoints + thisPhraseCount * 9
break