Skip to content

each_with_hit doesn't support includes to eager load associations #221

@sr3d

Description

@sr3d

collection.records.includes(:some_association).each_with_hit will error out: undefined method `each_with_hit' for #School::ActiveRecord_Relation:0x007fb13c51fe88

I looked around the source code and couldn't see it at all
(https://sourcegraph.com/github.com/elasticsearch/elasticsearch-rails@b500bf03d18f0852b9ee6ebc1aa15fe684f9a9f2/.tree/elasticsearch-model/lib/elasticsearch/model/response/records.rb). With Tire gem it's possible but somehow in the ES-Rails it's not.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions