Created
October 28, 2024 13:48
-
-
Save bassemawhoob/ef53b1f3566887801f732acd6632f8d9 to your computer and use it in GitHub Desktop.
Import raw hash data directly into Chewy without ActiveRecord
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import_payload = [ | |
{ | |
index: { | |
_id: id, | |
data: { | |
# ... | |
} | |
} | |
} | |
] | |
Chewy::Index::Import::Routine.new(ProductIndex).perform_bulk(import_payload) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment