Open amsdamsgram opened 7 years ago
I am not experiencing this with my serialized indexes. But your example seems to be missing something.
Before loading the serialized index, has the support already been added?
var lunr = require('./lunr.min.js');
require('./lunr.stemmer.support.js')(lunr);
require('./lunr.fr.js')(lunr);
var jsonIndex = <something to get JSON Serialized Index>
var idx = lunr.Index.load(jsonIndex);
The above works in my app.
Hey,
I'm having a
Error: Cannot load un-registered function: trimmer-fr
when trying to load an index built with french stemmer/stopWords.I have built the index following the doc:
Then I load the index like this:
lunr.Index.load(idx);
I'm doing this because I have the index file on a static host environment and I am fetching it in my mobile app. This way I don't have to bundle my app with it. For now, to make it works, I'm replacing the pipeline with the default one when I fetch it.
idx.pipeline = idx.pipeline.map(pipe => pipe.replace('-fr', ''))
Am I breaking something if I do this? Is there any other workarounds/fix?
Thanks!