olivernn / lunr.js

A bit like Solr, but much smaller and not as bright
http://lunrjs.com
MIT License
8.89k stars 548 forks source link

Help for language #416

Open dorel14 opened 4 years ago

dorel14 commented 4 years ago

hello I've tried setting lunr to use french language var listSelector = ".faq"; console.log(listSelector) var searchIndex = lunr(function() { this.use(lunr.fr); this.ref('id'); this.field('question'); this.field('answer'); this.field('tags');

ANd i have thsi error in building index

lunr.stemmer.support.js:289 Uncaught TypeError: token.replace is not a function at lunr.stemmer.support.js:289 at lunr.Pipeline.run (lunr.js:674) at lunr.Builder.add (lunr.js:2478) at lunr.Builder.<anonymous> (lunrSearch.js:30) at Array.forEach (<anonymous>) at lunr.Builder.<anonymous> (lunrSearch.js:28) at lunr (lunr.js:53) at FaqSearch (lunrSearch.js:5) at faq?searchbox=acompte:2469

I don't use with npm only in browser. Thx for help

olivernn commented 4 years ago

Could you provide a reproduction in something like jsbin?

dorel14 commented 4 years ago

Hello not at all .

zzossig commented 4 years ago

@olivernn Have you any plan for support korean or chinese? https://codesandbox.io/s/ecstatic-fog-th6mh?fontsize=14 I have tested japanese and it seems work well. but not korean.