Update search.js

fixed indent
This commit is contained in:
ozobi 2019-03-19 16:33:54 +01:00 committed by Matthew Taylor
parent a296946748
commit 18212e6759

View file

@ -17,25 +17,25 @@ function initLunr() {
// Set up lunrjs by declaring the fields we use // Set up lunrjs by declaring the fields we use
// Also provide their boost level for the ranking // Also provide their boost level for the ranking
lunrIndex = lunr(function() { lunrIndex = lunr(function() {
this.ref("uri"); this.ref("uri");
this.field('title', { this.field('title', {
boost: 15 boost: 15
}); });
this.field('tags', { this.field('tags', {
boost: 10 boost: 10
}); });
this.field("content", { this.field("content", {
boost: 5 boost: 5
}); });
this.pipeline.remove(lunr.stemmer); this.pipeline.remove(lunr.stemmer);
this.searchPipeline.remove(lunr.stemmer); this.searchPipeline.remove(lunr.stemmer);
// Feed lunr with each file and let lunr actually index them // Feed lunr with each file and let lunr actually index them
pagesIndex.forEach(function(page) { pagesIndex.forEach(function(page) {
this.add(page); this.add(page);
}, this); }, this);
}) })
}) })
.fail(function(jqxhr, textStatus, error) { .fail(function(jqxhr, textStatus, error) {
var err = textStatus + ", " + error; var err = textStatus + ", " + error;