matteodem / meteor-easy-search

Easy-to-use search for Meteor with Blaze Components
MIT License
438 stars 68 forks source link

Sorting #529

Closed muscaiu closed 7 years ago

muscaiu commented 7 years ago

Before implementing EasySearch i used to display my items sorted by createdAt like this:

return Items.find({}, { sort: { createdAt: -1 } })

  {{#each items}}
          {{> Item}}
  {{/each}}

Now, using EasySearch i have something like this

  {{#EasySearch.Each index=itemsIndex }}
          {{> Item}}
  {{/EasySearch.Each}}-->

, but the sorting is not working anymore.

Is there any way i could work with EasySearch and also display my items in a desired order?

matteodem commented 7 years ago

You can use the sort configuration on engine level: http://matteodem.github.io/meteor-easy-search/docs/core/