From 94abfc18dae55a58e30a2eab02ea8dcade220bb3 Mon Sep 17 00:00:00 2001 From: Luis Fernando Molina Date: Thu, 17 Dec 2020 17:49:02 +0100 Subject: [PATCH] more power to title exact match --- .../Superalgos/UI/Spaces/Docs-Space/DocsSpace.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Projects/Superalgos/UI/Spaces/Docs-Space/DocsSpace.js b/Projects/Superalgos/UI/Spaces/Docs-Space/DocsSpace.js index f3f39440d..23ef78afa 100644 --- a/Projects/Superalgos/UI/Spaces/Docs-Space/DocsSpace.js +++ b/Projects/Superalgos/UI/Spaces/Docs-Space/DocsSpace.js @@ -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