Make lunr pipeline feature optionable

If we have a note "Atom", and if the user types "a" or "at", then lunr pipeline ignores searching them because they are stop words. However, turning off this feature might not be a good idea when we have tons of body texts. So we turn it on as a default, but provide a way to turn it off as an option.
This commit is contained in:
Seongjae Lee
2015-09-12 01:04:11 -07:00
parent abb7339a6e
commit a3f5d445c0
2 changed files with 7 additions and 0 deletions
+2
View File
@@ -28,6 +28,8 @@ class NotationalVelocityView extends SelectListView
@populateList() if @documentsLoaded
@docQuery.on "removed", (fileDetails) =>
@populateList() if @documentsLoaded
if !atom.config.get('nvatom.enableLunrPipeline')
@docQuery.searchIndex.pipeline.reset()
isCursorProceeded: ->
editor = @filterEditorView.model
+5
View File
@@ -9,6 +9,11 @@ module.exports =
description: 'The directory to archive notes'
type: 'string'
default: path.join(process.env.ATOM_HOME, 'nvatom-notes')
enableLunrPipeline:
title: 'Enable Lunr Pipeline'
description: 'Lunr pipeline preprocesses query to make search faster. However, it will skip searching some of stop words such as "an" or "be".'
type: 'boolean'
default: true
notationalVelocityView: null