Project: Nocalhost (App Definition and Development / Application Definition & Image Build)
File: CHANGELOG-5.0.md

We enforce the usage of `context.Context` everywhere you execute a request. You need to change all your `Do()` calls to pass a context: `Do(ctx)`. This enables automatic request cancelation and many other patterns. If you don't need this, simply pass `context.TODO()` or `context.Background()`. Warmers are no longer necessary and have been . Optimize was deprecated in ES 2.0 and has been . Use instead. The `missing` query has been . Use `exists` query with `must_not` in `bool` query instead. The `and` query has been . Use `must` clauses in a `bool` query instead. TODO Is it removed? The `or` query has been . Use `should` clauses in a `bool` query instead. The `filtered` query has been . Use `bool` query instead, which supports `filter` clauses too. The `limit` query has been . Use the `terminate_after` parameter instead. The `template` query has been . You should use Search Templates instead. We remove it from Elastic 5.0 as the 5.0 update is already a good opportunity to get rid of old stuff. Both of these fields were deprecated and are now . The response type for Put/Delete search templates has changed. It only returns a single `acknowledged` flag now. The `fields` parameter has been renamed to `stored_fields`. See . The `fielddata_fields` parameter to `docvalue_fields`. The endpoint for checking whether a type exists has been changed from `HEAD {index}/{type}` to `HEAD {index}/_mapping/{type}`. See . The `?refresh` parameter previously could be a boolean value. It indicated whether changes made by a request (e.g. by the Bulk API) should be immediately visible in search, or not. Using `refresh=true` had the positive effect of immediately seeing the changes when searching; the negative effect is that it is a rather big performance hit. With 5.0, you now have the choice between these 3 values. `"true"` - Refresh immediately `"false"` - Do not refresh (the default value) `"wait_for"` - Wait until ES made the document visible in search See in the documentation. Notice that `true` and `false` (the boolean values) are no longer available now in

You must use a string instead, with one of the above values. The `ReindexerService` was a custom solution that was started in the ES 1.x era to automate reindexing data, from one index to another or even between clusters. ES 2.3 introduced its own so we're going to remove our custom solution and ask you to use the native reindexer. The `ReindexService` is available via `client.Reindex()` (which used to point to the custom reindexer). The was moved into a plugin in 2.0. Now its back in core with a complete rewrite based on the Bulk API. It has it's own endpoint at `/deleteby_query`. Delete By Query, Reindex, and Update By Query are very similar under the hood. The response from the above APIs changed a bit. E.g. the `retries` value used to be an `int64` and returns separate values for `bulk` and `search` now: ``` // Old { ... "retries": 123, ... } ``` ``` // New { ... "retries": { "bulk": 123, "search": 0 }, ... } ``` The `ScanService` is removed. Use the (new) `ScrollService` instead. There was confusion around `ScanService` and `ScrollService` doing basically the same. One was returning slices and didn't support all query details, the other returned one document after another and wasn't safe for concurrent use. So we merged the two and merged it into a new `ScrollService` that removes all the problems with the older services. In other words: If you used `ScanService`, switch to `ScrollService`. If you used the old `ScrollService`, you might need to fix some things but overall it should just work. Changes: We replaced `elastic.EOS` with `io.EOF` to indicate the "end of scroll". TODO Not implemented yet They have been . Some changes: Suggesters no longer have an . TODO Fix all structural changes in suggesters Percolator has . Elastic 5.0 adds the new which can be used in combination with the new . The Percolate service is removed from Elastic 5.0. The `consistency` parameter has been removed in a lot of places, e.g. the Bulk, Index, Delete, Delete-by-Query, Reindex, Update, and Update-by-Query API. It has been replaced by a somewhat similar `waitforactive_shards` parameter. See https://github.com/elastic/elasticsearch/pull/19454.