This version is still in development and is not considered stable yet. For the latest stable version, please use Spring Data Elasticsearch 5.4.0! |
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
knn search
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:
-
KnnSearch
: is the top levelknn
query in the elasticsearch request; -
KnnQuery
: is theknn
query insidequery
clause;
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
.