Docs: small search index improvements

This commit is contained in:
Lovell Fuller 2021-01-29 11:28:48 +00:00
parent b19dad69d6
commit 6dffb47973
2 changed files with 3 additions and 1 deletions

View File

@ -17,7 +17,7 @@ const extractKeywords = (str) =>
str str
.split(/[ -/]/) .split(/[ -/]/)
.map((word) => word.toLowerCase().replace(/[^a-z]/g, '')) .map((word) => word.toLowerCase().replace(/[^a-z]/g, ''))
.filter((word) => word.length > 2 && !stopWords.includes(word)) .filter((word) => word.length > 2 && word.length < 15 && !stopWords.includes(word))
) )
].join(' '); ].join(' ');

View File

@ -18,7 +18,9 @@ module.exports = [
'does', 'does',
'each', 'each',
'either', 'either',
'ensure',
'etc', 'etc',
'every',
'for', 'for',
'from', 'from',
'get', 'get',