We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5bff972 commit d2bc39eCopy full SHA for d2bc39e
js/search.js
@@ -30,6 +30,12 @@
30
}
31
32
33
+ function trimmerEnKo(token) {
34
+ return token
35
+ .replace(/^[^\w가-힣]+/, '')
36
+ .replace(/[^\w가-힣]+$/, '');
37
+ };
38
+
39
var searchTerm = getQueryVariable('query');
40
41
if (searchTerm) {
@@ -38,6 +44,12 @@
44
// Initalize lunr with the fields it will be searching on. I've given title
45
// a boost of 10 to indicate matches on this field are more important.
46
var idx = lunr(function () {
47
+ this.pipeline.reset();
48
+ this.pipeline.add(
49
+ trimmerEnKo,
50
+ lunr.stopWordFilter,
51
+ lunr.stemmer
52
+ );
53
this.field('id');
42
54
this.field('title', { boost: 10 });
43
55
this.field('author');
0 commit comments