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

Elastic search document count changes to default limit after 2 seconds #622

Open
lucased opened this issue Sep 7, 2017 · 2 comments
Open

Comments

@lucased
Copy link

lucased commented Sep 7, 2017

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.

{ count: cursor.mongoCursor.count && cursor.mongoCursor.count() || 0 }

Not sure if this is a bug or intender in the newer versions of ES.

@matteodem
Copy link
Owner

can you provide a PR? I'll have a closer look and check if Travis runs through with the tests

@zeroonedev
Copy link

Great thanks @matteodem have submitted a PR - #625

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

No branches or pull requests

3 participants