matteodem / meteor-easy-search

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

Please, improve documentation #435

Closed kemelzaidan closed 8 years ago

kemelzaidan commented 8 years ago

I want to know if I can pass multiple parameter to sort the index like that:

engine: new EasySearch.Minimongo({
        sort: function(){
            return ['upVotes:-1', 'downVotes:-1', 'createOn:-1'];
        }
    })

Reversing the sort order with -1, doesn't seem to work. The selector section on the documentation is hard to understand. What can it do?

As far as I can tell, the index is not a reactive collection, is it? Because I am increasing the upVotes values based on click events, and the sorting doesn't change.

matteodem commented 8 years ago

it re-uses the collection you provide and what you're returning are mongodb sort specifiers.

casual-will commented 8 years ago

This doesn't seem to work: {a: 1, b: -1}

Might want to make that clear somewhere.

http://docs.meteor.com/#/full/sortspecifiers