1.6 KiB
1.6 KiB
Upgrading from 0.3.x to 0.4.x
Version 0.4.0
moved the :bulk_page_size
and :bulk_wait_interval
settings
into each index's configuration, rather than global on the cluster.
Rationale
This makes it easier to have different bulk settings for different indexes.
Changes
BREAKING: :bulk_page_size
and :bulk_wait_interval
are now configured
on the index, not the cluster.
FEATURE: You can now pass --bulk-wait-interval
and --bulk-page-size
options to mix elasticsearch.build
, as requested in #26.
How to Update Your App
Move the :bulk_page_size
and :bulk_wait_interval
settings to your index
rather than your entire cluster.
# BEFORE
config :my_app, MyApp.ElasticsearchCluster,
api: Elasticsearch.API.HTTP,
json_library: Poison,
url: "http://localhost:9200",
username: "username",
password: "password",
bulk_page_size: 5000,
bulk_wait_interval: 0,
indexes: %{
posts: %{
settings: "test/support/settings/posts.json",
store: Elasticsearch.Test.Store,
sources: [Post]
}
}
# AFTER
config :my_app, MyApp.ElasticsearchCluster,
api: Elasticsearch.API.HTTP,
json_library: Poison,
url: "http://localhost:9200",
username: "username",
password: "password",
indexes: %{
posts: %{
settings: "test/support/settings/posts.json",
store: Elasticsearch.Test.Store,
sources: [Post],
bulk_page_size: 5000,
bulk_wait_interval: 0
}
}