Skip to content

NPE when updating primaryKey after meili update to 0.28.0 (breaking changes) #414

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
dbacinski opened this issue Jul 19, 2022 · 6 comments
Closed
Labels
maintenance Anything related to maintenance (CI, tests, refactoring...)

Comments

@dbacinski
Copy link

dbacinski commented Jul 19, 2022

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
@dbacinski
Copy link
Author

dbacinski commented Jul 19, 2022

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?

@dbacinski dbacinski changed the title NPE when updating primaryKey after meili update to 0.28.0 NPE when updating primaryKey after meili update to 0.28.0 (breaking changes) Jul 19, 2022
@alallema
Copy link
Contributor

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.

@rauldeheer
Copy link

Any news on this issue @alallema ?

@brunoocasali
Copy link
Member

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!

@rauldeheer
Copy link

Thank you for replying. I'll just wait for a new release, thanks. @brunoocasali

@alallema alallema added the maintenance Anything related to maintenance (CI, tests, refactoring...) label Oct 27, 2022
@alallema
Copy link
Contributor

This issue has been resolved #425

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
maintenance Anything related to maintenance (CI, tests, refactoring...)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants