Skip to content
Oliver Eilhard edited this page Apr 10, 2019 · 19 revisions

We use Elastic in production for more since 2012. Although Elastic is stable 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.

Versions

Notice that the master branch in Elastic is defunct! Development on the different versions happens on branches that follow the release-branch.v<X> pattern, where <X> is the current version of Elastic (release-branch.v7 at the time of writing this). If you want to use stable versions of Elastic, use the packages released via github.com/olivere/elastic (for v6 and v7) and gopkg.in (for v1-v5).

Here's the version matrix:

Elasticsearch version Elastic version Package URL
7.x 7.0 github.com/olivere/elastic/v7 (source doc)
6.x 6.0 github.com/olivere/elastic (source doc)
5.x 5.0 gopkg.in/olivere/elastic.v5 (source doc)
2.x 3.0 gopkg.in/olivere/elastic.v3 (source doc)
1.x 2.0 gopkg.in/olivere/elastic.v2 (source doc)
0.9-1.3 1.0 gopkg.in/olivere/elastic.v1 (source doc)

Example:

You have Elasticsearch 1.7.6 installed and want to use Elastic. As listed above, you should use Elastic 2.0. So you first install Elastic 2.0.

$ go get gopkg.in/olivere/elastic.v2

Then you use it via the following import path:

import "gopkg.in/olivere/elastic.v2"

Version 7.0

Elastic 7.0 targets Elasticsearch 7.0 and later. Elasticsearch 7.0.0 was released on 10th April 2019.

Here is the list of breaking changes in Elasticsearch 7.0. The most prominent change is the removal of types.

Notice that Elastic 7.0 supports Go modules and you need to use an import path of github.com/olivere/elastic/v7. Elastic 7.0 also requires a Go version of 1.10.3 or later (all versions of Go that support Go modules).

Version 6.0

Elastic 6.0 targets Elasticsearch 6.0 and later. Elasticsearch 6.0.0 was released on 14th November 2017.

Here is the list of breaking changes in Elasticsearch 6.0.

Version 5.0

Elastic 5.0 targets Elasticsearch 5.0 and later. Elasticsearch 5.0.0 was released on 26th October 2016.

Notice that there are a lot of breaking changes in Elasticsearch 5.0.

Version 3.0

Elastic 3.0 targets Elasticsearch 2.0 and later. Elasticsearch 2.0.0 was released on 28th October 2015.

Notice that there are a lot of breaking changes in Elasticsearch 2.0 and we used this as an opportunity to clean up and refactor Elastic as well.

Version 2.0

Elastic 2.0 targets Elasticsearch 1.x and published via gopkg.in/olivere/elastic.v2. It is deprecated and will only receive critical fixes.

Version 1.0

Elastic 1.0 is deprecated. You should really update Elasticsearch and Elastic to a recent version.

However, if you cannot update for some reason, don't worry. Version 1.0 is still available. All you need to do is go-get it and change your import path as described above.

Clone this wiki locally