Closed yogesh2591 closed 7 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}}
{{> 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??
What is the problem you're having?
unable to list out the all file name.
Closing as collectionFS is deprecated
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") ],
}
});
FilesIndex = new EasySearch.Index({ collection : Files.files, fields : ['metadata.name'], engine : new EasySearch.MongoDB() }); ` what changes need to be done here??