Skip to content

Releases: Charizard/ember-cli-lunr

Upgrade to lunr 2.x

30 Mar 04:04
Compare
Choose a tag to compare

What's the difference?

Lunr.js moved from a mutable index to an immutable index in 2.0 🚀. Which means, the earlier API which we had where all models added to the ember store was indexed is not possible anymore. Now, you will have to pass in an Array of Objects (can be Ember DS.Models) and build the index. Please check lunr.js docs about upgrading for more information about the differences and why.

What Next?

The basic indexing and searching for an arrays is working as of now.

  • But, indexing objects like this will be slow for large data sets. So, one way is to pre-build your index and serialise it as JSON and load it in. We have an issue #10 created for this. Check lunr.js docs on pre-building indexes.

  • One missing feature is the ability to support multiple languages. This is available by default in lunr.js. But, will need the ability to add wrapper for it and is documented as issue #11.

Want to work with mutable indexes?

You could use the older version (v0.0.5) of this add-on.

Enjoy the new version and please support by contributing to the project (PRs are welcome 😛). Thanks!!