With chewy gem, if I run:
MyIndex.filter{attribute1?}.count
It will always return 10 occurences.
I know this is an ElasticSearch default and I have read this question, which says I should set the param size
on the URL to a big number, to get all occurrences.
The problem is that I can't seem to find where to set URL params for a request to the elasticSearch server on chewy gem, so that it would do a get request like this one, internally:
localhost:9200/foo/_search?size=500000...
UPDATE:
Well... Minutes after I've posted my question, I seem to have found a solution.
If I use the limit
function like this:
MyIndex.filter{attribute1?}.limit(100000000).count
I seem to get the number of occurences I was expecting. Now I ask, is it the right way?