theablefew / stretchy

Elasticsearch Models for Rails with an ActiveRecord-like behavior
https://theablefew.github.io/stretchy/#/
MIT License
2 stars 0 forks source link

Fix Calling limit with count returns unexpected results #54 #72

Closed esmarkowski closed 3 months ago

esmarkowski commented 3 months ago

This pull request fixes the issue where calling limit with count returns unexpected results in the CrashEvent class. The issue was caused by the size parameter being deleted in the count! method. This pull request adds the default_size to the query builder and fixes the deletion of size in the count! method.

Here's what's happening:

When we provide a query without limit

When we provide a query with a limit

Solution

Fixes #54