meilisearch / meilisearch-java

Java client for Meilisearch

Home Page:https://meilisearch.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Using Meilisearch-java client in an Android App

AmirDotDev0 opened this issue · comments

Hello, I want to implement search functionality on my android app using Meilisearch and I'm wondering if the Java client can be implemented in an Android app or should I use the JavaScript client in my nodejs API and get the search results using my rest API?

Hi @AmirOsman2020!

Yes, you can, but it is up to you if you want to go for the nodejs direction is also acceptable. The good thing about using the SDK directly is that you can save some ms from the extra roundtrip you would have been doing if you went for the nodejs version.

Thanks for using Meilisearch ❤️

Great, thanks for the clarification but I'm a little bit concerned about security, if I connected to Meilisearch directly from my app using the Meilisearch-java (Client client = new Client(new Config("http://localhost:7700", "masterKey"));) then I'll be exposing the URL and the MasterKey knowing that android apps (APKs) can be easily reversed engineered.

You should not use the masterKey in the SDK, even in the backend ones, the masterKey should be used only for creating other keys with fewer permissions!

Thanks, @brunoocasali for answering this ❤️ !
HI @AmirOsman2020,
For more information about key usage, you can check the documentation about it.