Skip to content
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

Drastically speed up imports when bulk_size is specified #606

Merged
merged 3 commits into from
Mar 10, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Merge remote-tracking branch 'origin/master'
  • Loading branch information
Mitch Birti committed Mar 6, 2018
commit d84b6cd0c4dca6db5de626bd9e0b35cb046d82cd
2 changes: 1 addition & 1 deletion lib/chewy/type/import/journal_builder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def entries(action, objects)
index_name: @type.index.derivable_name,
type_name: @type.type_name,
action: action,
references: identify(objects).map { |item| ::Elasticsearch::API.serializer.dump(item) },
references: identify(objects).map { |item| Base64.encode64(::Elasticsearch::API.serializer.dump(item)) },
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't get how this one is related

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's the serialization optimization mentioned above. This uses the serializer Elasticsearch decided to use, instead of the slow default one.

created_at: Time.now.utc
}
end
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.