olivernn / lunr.js

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

What is Out of order word insertion? #507

Open ayush-sharma opened 2 years ago

ayush-sharma commented 2 years ago

While populating a pre-built index I'm getting the following error:

Uncaught Error: Out of order word insertion
    insert https://unpkg.com/lunr/lunr.js:1771
    load https://unpkg.com/lunr/lunr.js:2305
    <anonymous> http://localhost:4000/static/js/script-search.js:89
    EventListener.handleEvent* http://localhost:4000/static/js/script-search.js:80

The code I'm using to populate the index:

var idx = lunr.Index.load(JSON.parse(window.my_big_index));

I wasn't able to find any info googling around. What does this error mean, and what's the best way to fix it?

Thanks.

ayush-sharma commented 2 years ago

Hi all,

I'm still unable to diagnose this issue, and I'm trying random things since I don't know what its about.

Any ideas?