Upgrading from 5.3.x to 5.4.x

This section describes breaking changes from version 5.3.x to 5.4.x and how removed features can be replaced by new introduced features.

Breaking Changes

The withKnnQuery method in NativeQueryBuilder has been replaced with withKnnSearches to build a NativeQuery with knn search.

KnnQuery and KnnSearch are two different classes in elasticsearch java client and are used for different queries, with different parameters supported:

If KnnQuery is still preferable, please be sure to construct it inside query clause manually, by means of withQuery(co.elastic.clients.elasticsearch._types.query_dsl.Query query) clause in NativeQueryBuilder.

Deprecations

Removals