mirror of
https://github.com/wassname/nvatom.git
synced 2026-07-20 12:30:19 +08:00
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:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user