Ive just upgraded to the latest version of Easy Search + Elastic Search and everything work as normal except the pagination component, 2 seconds after the search results load the pagination component disappears.
Ive had a look into the issue and can see the count() property on the cursor that gets returned changes from the total search document count to the defaultSearchOptions limit after 2 second which is occurring in the setInterval in search-collection.js of easysearch:core.
Ive just upgraded to the latest version of Easy Search + Elastic Search and everything work as normal except the pagination component, 2 seconds after the search results load the pagination component disappears.
Ive had a look into the issue and can see the count() property on the cursor that gets returned changes from the total search document count to the defaultSearchOptions limit after 2 second which is occurring in the setInterval in search-collection.js of easysearch:core.
In search-collection.js If i change { count: cursor.mongoCursor.count && cursor.mongoCursor.count() || 0 } to { count: cursor.count && cursor.count() || 0 } everything seem to work again. https://github.com/matteodem/meteor-easy-search/blob/4829f47d251faff38e456874b3ca364416ed78ed/packages/easysearch:core/lib/core/search-collection.js#L195
Not sure if this is a bug or intender in the newer versions of ES.