Versions (relevant - OpenSearch/Dashboard/Server OS/Browser): 2.13.0
Describe the issue:
- It is not clear what the
documents()
API in theSearchResults
does: SearchResult (java-client 2.13.0 API) - The document does not provide any further information.
- I expected this API to return a list of results in the object class I defined. However, when I perform testing, this API always returns empty/null; instead, I have to iterate through
searchResponse.hits().hits()
to see the results, like example here: https://opensearch.org/docs/latest/clients/java/#searching-for-documents.
What is the proper way to set-up / use this API?