api-clients-automation icon indicating copy to clipboard operation
api-clients-automation copied to clipboard

Please document use of generic classes to parse search results

Open alexspurling opened this issue 1 year ago • 0 comments
trafficstars

The current documentation for the Java API client is out of date. It shows an example with the following code:

SearchForHits request = new SearchForHits()
        .setIndexName("<YOUR_INDEX_NAME>")
        .setQuery("my aloglia ojbect");
SearchMethodParams params = new SearchMethodParams().addRequests(request);
SearchResponses responses = client.search(params);
System.out.println(responses);

This will fail because as of https://github.com/algolia/api-clients-automation/pull/2413 the client.search method now requires two parameters. It's not clear from the javadoc of this function what value for the second parameter innerType is expected.

Please give documentation which is up to date and describes how to use generics. Alternatively please give documentation how how to use the client library without using generics.

alexspurling avatar Apr 23 '24 16:04 alexspurling