matteodem / meteor-easy-search

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

How To use Easy Search with Collection fs #504

Closed yogesh2591 closed 7 years ago

yogesh2591 commented 8 years ago

How to use Easy Search with Collectionfs package .

Search.html {{> EasySearch.Input index=searchindex}} {{#EasySearch.Each index=searchindex }} Filename : {{metadata.name}} {{/EasySearch.Each}}

Search.js `Template.searchBox.helpers({ searchindex: () => FilesIndex });

Template.searchBox.onCreated(function(){ var self = this; this.autorun(function(){ self.subscribe('files') }); });`

Collection.js ` Files = new FS.Collection("files", { stores: [ new FS.Store.GridFS("files") ],

 filter: {
    maxSize: 64 * 1024 * 1024,

  onInvalid: function(message) {
    Meteor.isClient && alert(message);
    console.log(message);
}

}

});

FilesIndex = new EasySearch.Index({ collection : Files.files, fields : ['metadata.name'], engine : new EasySearch.MongoDB() }); ` what changes need to be done here??

matteodem commented 8 years ago

What is the problem you're having?

yogesh2591 commented 8 years ago

unable to list out the all file name.

matteodem commented 7 years ago

Closing as collectionFS is deprecated