lunr-no
v0.0.4
Published
Norwegian trimmer, stemmer and stopword filter for Lunr
Downloads
4
Readme
Norwegian lunr
lunr-no features a Norwegian trimmer, language stemmer and stopword filter for Lunr.js (a js full text search engine).
How to use
lunr-no supports AMD and CommonJS. Check out the examples below:
In a web browser
Add the following JS files to the page:
<script src="lunr.stemmer.support.js"></script>
<script src="lunr.no.js"></script>
then, use the language in when initializing lunr:
var index = lunr(function () {
// use the language
this.use(lunr.no);
// then, the normal lunr index initialization
this.field('title', { boost: 10 });
this.field('body');
});
That's it. Just add the documents and you're done.
With node.js (or with browserify)
var lunr = require('lunr');
require('lunr-no/lunr.stemmer.support.js')(lunr);
require('lunr-no')(lunr);
var index = lunr(function () {
// use the language
this.use(lunr.no);
// then, the normal lunr index initialization
this.field('title', { boost: 10 })
this.field('body')
});
Building your own files
See lunr-languages.
Technical details & Credits
This is a fork of lunr-languages. The code is identical, except the added trimmer.