matteodem / meteor-easy-search

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

Client Side Collection Search #483

Closed dominicarrojado closed 8 years ago

dominicarrojado commented 8 years ago
SampleCollection = new Mongo.Collection(null);

SampleCollectionIndex = new EasySearch.Index({
    collection: SampleCollection,
    fields: ['title'],
    engine: new EasySearch.Minimongo()
});

Sorry, I know the package can do search with client side collections #25. Just wondering why everytime I search it always has no search results? Or did I do it wrong? How to do it properly? There's no example in the docs using a client collection.

matteodem commented 8 years ago

Do you populate your SampleCollection on the client? Can you provide me with a small reproduction repository?

dominicarrojado commented 8 years ago

@matteodem just found out the problem I guess its a bad practice calling SampleCollection = new Mongo.Collection(null); everytime I visit that page again. So if clearing collection just use SampleCollection.remove({});