Skip to content

Upgrade to lunr 2.x

Latest
Compare
Choose a tag to compare
@Charizard Charizard released this 30 Mar 04:04
· 1 commit to master since this release

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!!