ElasticSearch and Rails: Where did my records go?
When working with the Elasticsearch::Model search method and a chaining other ActiveRecord queries you can run into a situation where it looks like the search is not returning the expected results. This is most likely due to the fact that the Elasticsearch::Model search method sets a size of 10 to limit the records returned. If you have missing results try passing the size option to the method with a larger limit. For example: