從 5.2.x 升級到 5.3.x

本節介紹從 5.2.x 版本到 5.3.x 版本的重大變更,以及如何透過新引入的功能替換已刪除的功能。

重大變更

@Query 註解的倉庫方法中進行引數替換時,以前的版本在實際引數值為 null 時會將字串 "null" 寫入傳送到 Elasticsearch 的查詢中。由於 Elasticsearch 不儲存 null 值,這種行為可能導致問題,例如當要搜尋的欄位包含字串 "null" 時。在 5.3 版本中,引數中的 null 值將導致丟擲 ConversionException。如果您將 "null" 用作欄位對映中定義的 null_value,那麼請將該字串而不是 Java null 傳遞到查詢中。

棄用

移除

已棄用的類 org.springframework.data.elasticsearch.ELCQueriesorg.springframework.data.elasticsearch.client.elc.QueryBuilders 已被移除,請改用 org.springframework.data.elasticsearch.client.elc.Queries

© . This site is unofficial and not affiliated with VMware.