mirror of
https://github.com/danbulant/api_docs
synced 2026-06-20 06:41:40 +00:00
Removes lunr stemmer from search index pipeline
Signed-off-by: Christopher Rogers <chrissrogers@gmail.com>
This commit is contained in:
parent
3c4e0d0bae
commit
440c799c4c
1 changed files with 7 additions and 7 deletions
|
|
@ -3,12 +3,13 @@
|
||||||
var $global = $(global);
|
var $global = $(global);
|
||||||
var content, searchInfo;
|
var content, searchInfo;
|
||||||
var highlightOpts = { element: 'span', className: 'search-highlight' };
|
var highlightOpts = { element: 'span', className: 'search-highlight' };
|
||||||
var index = lunr(function () {
|
|
||||||
this.ref('id');
|
var index = new lunr.Index;
|
||||||
this.field('title', { boost: 10 });
|
|
||||||
// this.field('tags', { boost: 100 });
|
index.ref('id');
|
||||||
this.field('body');
|
index.field('title', { boost: 10 });
|
||||||
});
|
index.field('body');
|
||||||
|
index.pipeline.add(lunr.trimmer, lunr.stopWordFilter);
|
||||||
|
|
||||||
$(populate);
|
$(populate);
|
||||||
$(bind);
|
$(bind);
|
||||||
|
|
@ -25,7 +26,6 @@
|
||||||
index.add({
|
index.add({
|
||||||
id: title.prop('id'),
|
id: title.prop('id'),
|
||||||
title: title.text(),
|
title: title.text(),
|
||||||
// tags: tags,
|
|
||||||
body: body.text()
|
body: body.text()
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue