-
Notifications
You must be signed in to change notification settings - Fork 791
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Elasticsearch model import method conflicts with Rails 6.1 activerecord import method #1009
Comments
Actually, the problem is more that 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:
It will fetch all Article, not the specified one as the import. I tried this without in_batches(of: 50) and got the same result. ie, this simplifies down to:
|
This is still a problem, |
Hi there! Migrating some code from rails 5.2 to rails 6.1.4 and this code is failing:
with a traceback like this:
which seems to be because rails has natively imported the bulk import feature.
I tried working around this by calling
but instead that cause ActiveRecords import method to still be called, and that calls some serialization code, which ends badly with a "document too large' error, like this:
so it doesn't work.
The text was updated successfully, but these errors were encountered: