fix: search not indexing properly + cjk/arabic validators

This commit is contained in:
NGPixel
2017-05-14 11:24:05 -04:00
parent 8f974a3ac7
commit f5aa726cd5
12 changed files with 26 additions and 23 deletions

View File

@@ -92,7 +92,7 @@ module.exports = {
title: content.title,
subtitle: content.subtitle || '',
parent: content.parent || '',
content: content.content || ''
content: content.text || ''
}]).then(() => {
winston.log('verbose', 'Entry ' + content._id + ' added/updated to search index.')
return true
@@ -160,7 +160,7 @@ module.exports = {
.deburr()
.toLower()
.trim()
.replace(/[^a-z0-9 ]/g, '')
.replace(/[^a-z0-9 ]/g, ' ')
.value()
let arrTerms = _.chain(terms)
.split(' ')