Skip to content

Commit ef53230

Browse files
committed
switching fieldcaps api to utilize js client
Signed-off-by: Amit Galitzky <amgalitz@amazon.com>
1 parent 0645781 commit ef53230

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

server/routes/opensearch.ts

+4-4
Original file line numberDiff line numberDiff line change
@@ -422,10 +422,10 @@ export default class OpenSearchService {
422422

423423
// make call to fields_caps
424424
if (remoteIndices.length) {
425-
const fieldCapsResponse = await callWithRequest('transport.request', {
426-
method: 'GET',
427-
path:
428-
remoteIndices.toString() + '/_field_caps?fields=*&include_unmapped',
425+
const fieldCapsResponse = await callWithRequest('fieldCaps', {
426+
index: remoteIndices.toString(),
427+
fields: '*',
428+
include_unmapped: true
429429
});
430430
remoteMappings = convertFieldCapsToMappingStructure(fieldCapsResponse);
431431
}

0 commit comments

Comments
 (0)