2.11.1" (relevant - OpenSearch/Dashboard/Server OS/Browser):
OpenSearchTransport transport = new RestClientTransport(restClient, new JacksonJsonpMapper());
client = new OpenSearchClient(transport);
String index = “buscador-sentencia-idx”;
String query = “"Text to be search"”;
SearchRequest.Builder requestBuilder = new SearchRequest.Builder();
requestBuilder.index(index);
// Section with fields to be return after query from OpenSearch.
SourceConfig.Builder sb = new SourceConfig.Builder();
SourceConfig sourceConfig = SourceConfig.Builder().includes(Arrays.asList(“field1”, “field2”, “field3”)).build();
requestBuilder.source(sourceConfig);
Describe the issue:
Configuration:
Relevant Logs or Screenshots: