Searching for users with the java client
-
Hello, with the Java client we are searching Users in FusionAuth that are in a specific Group, using the method client.searchUsersByQuery(). We currently use Elasticsearch as search engine, but it seems to be slow even with the local install (270 Groups, 500 Users in total). So we would like to compare performance to using the database search engine (PosgreSQL).
Although this search request (Users in a Group) does not require a JSON request body but can be handled via URL parameters (queryString), the Java client still calls the user search API with a JSON request body.
The docs state that advanced queries via a JSON request body are not possible with the database search engine. My question is if it is possible to use the Java client for user search without JSON request body, but only queryString as URL parameter? Since I could not find this in the docs or Java code, I am asking here.
-
It appears there is no way to search using the Java client that uses a
GET
, only aPOST
. However, you can still provide thequeryString
in the JSON and it will be equivalent to theGET
request.Building this JSON:
{ "search": { "queryString": "fusionauth.io" } }
Is equivalent to
queryString=fusionauth.io
.Hope that helps.