跳到主要内容

从 5.3.x 升级到 5.4.x

DeepSeek V3 中英对照 Upgrading from 5.3.x to 5.4.x

本节描述了从版本 5.3.x 到 5.4.x 的重大变更,以及如何通过新引入的功能替换已移除的功能。

重大变更

NativeQueryBuilder 中的 withKnnQuery 方法已被替换为 withKnnSearches,用于构建带有 knn 搜索的 NativeQuery

KnnQueryKnnSearch 是 Elasticsearch Java 客户端中的两个不同类,用于不同的查询,并且支持不同的参数:

如果仍然倾向于使用 KnnQuery,请确保在 query 子句中手动构建它,通过 NativeQueryBuilder 中的 withQuery(co.elastic.clients.elasticsearch._types.query_dsl.Query query) 子句来实现。

弃用

移除