summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoruvok cheetah2020-05-24 19:30:56 +0200
committeruvok cheetah2020-05-24 19:30:56 +0200
commit3385a7a3e69f0963306aeb14cb9614cf2c59fa01 (patch)
treeb1d3e2fd4360d17e8e1ad0a2797e9778cae0f055
parent04b7f70a788a078763b5559bba8a8fdebe6630a2 (diff)
Use custom pipeline with no changes for search
Makes no sense since I mix DE and EN
-rw-r--r--assets/js/search.js9
1 files changed, 8 insertions, 1 deletions
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');