meilisearch-java
meilisearch-java copied to clipboard
NPE when updating primaryKey after meili update to 0.28.0 (breaking changes)
Description
After update of meilisearch from 0.27.2 to 0.28.0 updating of index primary key has started failing with NPE
meiliClient.updateIndex("indexName", "productId")
Exception in thread "main" java.lang.NullPointerException
at java.base/java.io.Reader.<init>(Reader.java:168)
at java.base/java.io.InputStreamReader.<init>(InputStreamReader.java:76)
at com.meilisearch.sdk.http.DefaultHttpClient.execute(DefaultHttpClient.java:62)
at com.meilisearch.sdk.http.DefaultHttpClient.put(DefaultHttpClient.java:87)
at com.meilisearch.sdk.MeiliSearchHttpRequest.put(MeiliSearchHttpRequest.java:106)
at com.meilisearch.sdk.IndexesHandler.updatePrimaryKey(IndexesHandler.java:83)
at com.meilisearch.sdk.Client.updateIndex(Client.java:139)
It seems like version 0.28.0 is not returning any response but the client library is expecting to get one.
It works fine after reverting meili to 0.27.2
Environment (please complete the following information):
- OS: Linux
- Meilisearch version: v.0.28.0
- meilisearch-java version: v0.7.2
https://github.com/meilisearch/meilisearch/releases/tag/v0.28.0 I see there are breaking changes in 0.28.0:
The endpoint to update an index is now PATCH /indexes/{indexUid} instead of PUT
when do you plan to adapt java library to those changes?
Hi @dbacinski, Indeed the v0.28.0 of Meilisearch has been released last week but the SDK is not yet updated with this. The v0.7.2 of this SDK is only compatible with the v0.27, I let you check the changelog about it. I will try to update it as soon as possible but we have to make a refactor of this SDK so it could take some time. Sorry for the inconvenience.
Any news on this issue @alallema ?
Hi @rauldeheer, @alallema is currently on vacation :)
But we are still working on that refactor; unfortunately, we can't give you an estimation of when we should finish it.
Thanks for using Meilisearch, and sorry for the inconvenience!
Thank you for replying. I'll just wait for a new release, thanks. @brunoocasali