slashdotdash / jekyll-lunr-js-search

[UNSUPPORTED] Jekyll + lunr.js = static websites with powerful full-text search using JavaScript
MIT License
548 stars 109 forks source link

Why it's always use lunr.js v0.4.5? #105

Closed yefeiyu closed 7 years ago

yefeiyu commented 8 years ago

At first, it's appear " you need install --v8". I am use 'bower install v8', so bower installed "v8.js, mustache.js, URI.js, date.format.js and lunr.js", and said" lunr.js v0.4.5 depand to jeky-lunr-js-search v0.3.1, NOT lunr.js v0.7.0". When I installed them, It's still appear "need --v8". untill I do "gem install jekyll-lunr-js-search". So the result is :

      Generating... 
              Lunr: Creating search index...
              Lunr: Index ready (lunr.js v0.4.5)         <<-------------here
                    done in 4.094 seconds.

Although I use bower uninstall v8 or change lunr.js with v0.7.0. What should I do?


And, How do I install `lunr-languages'? I didn't understand at all.

then, use the language in when initializing lunr:

var idx = lunr(function () {
    // use the language (de)
    this.use(lunr.de);
    // then, the normal lunr index initialization
    this.field('title', { boost: 10 });
    this.field('body');
});

How should I do?

gravelld commented 8 years ago

I'm seeing something similar - 0.4.5 is installed. When I try to search, I get no results. When I step through the code in jquery.lunr.search.js I get:

var idx = lunr.Index.load("/js/index.json")
version mismatch: current 0.4.5 importing undefined 
slashdotdash commented 7 years ago

I've just upgraded the JavaScript dependencies. So v3.3.0 of this gem references lunr.js v0.7.2

yefeiyu commented 7 years ago
# bower install 
# bundle install
# rake build