Skip to content

ActiveRecord adapter ignores query parameters and conditions in Rails 6.1 aka Elasticsearch::Transport::Transport::Errors::RequestEntityTooLarge error #1012

Open
@robmathews

Description

@robmathews

The ActiveRelation integration is broken, so that instead of updating only the specified records, it is attempting to update all records, ignoring the conditions on the relation.

ie, if you do something like:

objs = Article.where(id: 1)
objs.__elasticsearch__.import(refresh: true)

It will attempt to generate an index update for all articles in the database, not just the one, and this results in a Elasticsearch::Transport::Transport::Errors::RequestEntityTooLarge error.

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