matteodem / meteor-easy-search

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

First query returns empty #520

Closed KudMath closed 7 years ago

KudMath commented 7 years ago

The first time I send a query through .search(input).fetch() my index seems to return empty, but works on a second attempt. It works the same way if I change input, first request empty, second one works normally... I have no clue why it behaves that way, any idea?

KudMath commented 7 years ago

http://stackoverflow.com/questions/38805410/meteoreasy-search-first-query-returns-empty You need to wrap the query in an autorun as the publication of results to the client takes some time.