Skip to content

Instantly share code, notes, and snippets.

@bassemawhoob
Created October 28, 2024 13:48
Show Gist options
  • Save bassemawhoob/ef53b1f3566887801f732acd6632f8d9 to your computer and use it in GitHub Desktop.
Save bassemawhoob/ef53b1f3566887801f732acd6632f8d9 to your computer and use it in GitHub Desktop.
Import raw hash data directly into Chewy without ActiveRecord
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