-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Changes
We use Elastic in production for more since 2012. Although Elastic is quite stable from our experience, we don't have a stable API, and probably never will.
The reason for this is that Elasticsearch changes quite often and at a fast pace. At this moment we still focus on features, not on a stable API.
Having said that, there have been no huge changes that required us to rewrite our applications big time. More often than not it's renaming APIs and adding/removing features so that we are in sync with the Elasticsearch API.
This page is meant to be a guideline about changes in the API as we move along from version to version.
We're using gopkg.in to target different versions. If you want to continue using Elastic version 1, first go-get the package:
$ go get -u gopkg.in/olivere/elastic.v1
Use the following import path in your Go code:
import "gopkg.in/olivere/elastic.v1"
I will continue making bugfixes for version 1. New features will be available in the most recent version only.
Elastic version 2 will be available at gopkg.in/olivere/elastic.v2
once it's ready.
If you continue to use github.com/olivere/elastic
in your code base, you are following master. I try to keep master stable, but things might break now and then.
Version 2 will come with a number of changes. Work is currently being done in the client-refactoring branch.
- It will have a new way of creating a client. The signature of
elastic.NewClient(...)
has changed. - It will automatically pick up changes in your cluster (adding/removing nodes).
- It will use all your nodes by a round-robin strategy.
- It will automatically detect dead nodes and revive dead nodes.
- It will automatically retry requests up to a configured retry count.
- It will have a separating between error logs, info logs, and trace logs.
Debug(...)
is gone. - It will allow you to use your own decoder for the JSON response.
- It will have some more APIs.