ElasticSearch search has_many relation
If we're talking about the https://github.com/elasticsearch/elasticsearch-rails/blob/master/elasticsearch-model gem, the scope doesn't really matter here.
You have to use a filtered
query, and put use a filter on something on like article_id
.
(There's a comprehensive example for associations here: https://github.com/elasticsearch/elasticsearch-rails/blob/master/elasticsearch-model/examples/activerecord_associations.rb)