From 3385a7a3e69f0963306aeb14cb9614cf2c59fa01 Mon Sep 17 00:00:00 2001 From: uvok cheetah Date: Sun, 24 May 2020 19:30:56 +0200 Subject: Use custom pipeline with no changes for search Makes no sense since I mix DE and EN --- assets/js/search.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'assets/js') diff --git a/assets/js/search.js b/assets/js/search.js index 68f56ff..1ddb264 100644 --- a/assets/js/search.js +++ b/assets/js/search.js @@ -15,8 +15,15 @@ const do_search = function() { {% endfor %} ]; + var mylunr = function (config) { + var builder = new lunr.Builder + // no pipeline + config.call(builder, builder) + return builder.build() + } + // index - const idx = lunr(function () { + const idx = mylunr(function () { this.ref('url'); this.field('title'); this.field('content'); -- cgit v1.2.3