MihaiValentin / lunr-languages

A collection of languages stemmers and stopwords for Lunr Javascript library
Other
431 stars 163 forks source link

problem with FR #58

Open dorel14 opened 4 years ago

dorel14 commented 4 years ago

Hello i've tried integrate lunr-fr in my project and i have this message in console

lunr.SortedSet is not a constructor

my lunr version is 2.3.6

alexander-ladygin commented 4 years ago

Hello i've tried integrate lunr-fr in my project and i have this message in console

lunr.SortedSet is not a constructor

my lunr version is 2.3.6

Did you solve the problem?

alexander-ladygin commented 4 years ago

The problem was solved as follows: lurn connected using the webpack, installed from npm [packages: lurn, lurn-languages], after which everything worked.

And I connected only 1 language (not "en"), it did not work, as soon as I connected several languages (in my case, "ru"), then everything worked.

var lunr = require("lunr")
require("lunr-languages/lunr.stemmer.support")(lunr)
require('lunr-languages/lunr.multi')(lunr)
require("lunr-languages/lunr.ru")(lunr)

var idx = lunr(function () {
  this.use(lunr.multiLanguage('en', 'ru'))
})