Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue around document count changing #625

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

zeroonedev
Copy link

@zeroonedev zeroonedev commented Sep 13, 2017

Changing cursor.mongoCursor.count() to cursor.count() to prevent the publication returning the wrong count. This stops the pagination component from disappearing when using the elastic search engine.

Changing cursor.mongoCursor.count() to cursor.count() to prevent the publication returning the wrong count. This stops the pagination component from disappearing.
@@ -192,7 +192,7 @@ class SearchCollection {
() => this.changed(
collectionName,
'searchCount' + definitionString,
{ count: cursor.mongoCursor.count && cursor.mongoCursor.count() || 0 }
{ count: cursor.count && cursor.count() || 0 }
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is a correct solution, as the mongoCursor has the count based on the current skip and limit, see

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants