matteodem / meteor-easy-search

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

Added an option to check for a specific constructor of a collection #531

Closed ilan-schemoul closed 7 years ago

ilan-schemoul commented 7 years ago

Answer to the issue #527, was one couldn't use a collection NOT based on Meteor.collections as when one create EasySearch index, EasySearch used to check(config.collection, Meteor.Collection); so I added a parameter specialCollection to EasySearch.Index called specialCollection which take a string as the name of the name of the class of the collection. Instance :

// Instantiate a ground collection or whatever collection you want
localWorksheets = new Ground.Collection('worksheets');

  WorksheetsSearch = new EasySearch.Index({
    collection: localWorksheets,
    specialCollection: 'Ground.Collection',
});

And the collection is just working with EasySearch.

matteodem commented 7 years ago

Can you please revert all the directory name changes? shouldn't be a problem

ilan-schemoul commented 7 years ago

Sorry I cannnot because I'm working under Windows which probably converted : to _ automatically...I didn't see that before you told me before tough. Sorry about that.

matteodem commented 7 years ago

it's fine, where are the actual code changes? Just so that I might transfer them into the core and tag you in the commit

ilan-schemoul commented 7 years ago

Sure, line 17/18

ilan-schemoul commented 7 years ago

Too sad to hear that I couldn't properly participate to some Meteor open source projects and especially yours, which is really, really great by the way.

matteodem commented 7 years ago

Thanks! you can, I'll definitely tag you in the commit when I get to it

matteodem commented 7 years ago

This is now implemented with a ignoreCollectionCheck property