matteodem / meteor-easy-search

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

indexes.filter is not a function #591

Closed isAlmogK closed 7 years ago

isAlmogK commented 7 years ago

I'm getting the following on the client "indexes.filter is not a function"

I don't have any filter sets

My code

index

export const RolesIndex = new Index({
  engine: new MongoDBEngine({}),
  collection: Roles,
  fields: ['name']
});

template

<div class="row">
        <div class="container">
          {{> EasySearch.Input indexes=rolesIndex attributes=inputAttributes }}
          {{#each roles}}
            {{>Self_service_user_cards role=this}}
          {{/each}}
        </div>
    </div>

template js


inputAttributes: function () {
    return { 'class': 'easy-search-input', 'placeholder': 'Start searching...' };
  },
  roles : function () {
    return Roles.find({$and: [{ recruited: true}, { suspended: false}, { role: 0 }]});
  },
  rolesIndex : function () {
    console.log('aaa');
    console.log(RolesIndex)
    return RolesIndex;
  }```
isAlmogK commented 7 years ago

Fixed an issue in my code had indexs and not index