From ef532301f340a96fbf584501d48b01ae2cc31495 Mon Sep 17 00:00:00 2001 From: Amit Galitzky Date: Mon, 24 Feb 2025 13:25:13 -0800 Subject: [PATCH] switching fieldcaps api to utilize js client Signed-off-by: Amit Galitzky --- server/routes/opensearch.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/server/routes/opensearch.ts b/server/routes/opensearch.ts index 2ef9d8a9..1b219cf0 100644 --- a/server/routes/opensearch.ts +++ b/server/routes/opensearch.ts @@ -422,10 +422,10 @@ export default class OpenSearchService { // make call to fields_caps if (remoteIndices.length) { - const fieldCapsResponse = await callWithRequest('transport.request', { - method: 'GET', - path: - remoteIndices.toString() + '/_field_caps?fields=*&include_unmapped', + const fieldCapsResponse = await callWithRequest('fieldCaps', { + index: remoteIndices.toString(), + fields: '*', + include_unmapped: true }); remoteMappings = convertFieldCapsToMappingStructure(fieldCapsResponse); }