Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Feature request: allow eager loading when searching across multiple models #990

Open
Labels
@SeanLF

Description

When searching on a single model, we can chain methods like includes.
However this fails when searching across multiple models:

search = Elasticsearch::Model.search(query: {}, [ModelA, ModelB])
db_records = search.records.includes(:association)
=> Elasticsearch::Transport::Transport::Errors::BadRequest

It'd be nice to be able to do this without having to monkey patch the library.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /