diff --git a/packages/osd-opensearch-archiver/src/lib/docs/__tests__/index_doc_records_stream.ts b/packages/osd-opensearch-archiver/src/lib/docs/__tests__/index_doc_records_stream.ts index b7078c7a1c01..4003c19cd214 100644 --- a/packages/osd-opensearch-archiver/src/lib/docs/__tests__/index_doc_records_stream.ts +++ b/packages/osd-opensearch-archiver/src/lib/docs/__tests__/index_doc_records_stream.ts @@ -41,9 +41,21 @@ import { createStubStats, createStubClient, createPersonDocRecords } from './stu const recordsToBulkBody = (records: any[]) => { return records.reduce((acc, record) => { - const { index, type, id, source } = record.value; - - return [...acc, { index: { _index: index, _type: type, _id: id } }, source]; + const { index, id, source } = record.value; + + return [ + ...acc, + { + index: { + _index: index, + // TODO: verify no BWC issues here + // Removed: https://github.com/opensearch-project/OpenSearch/pull/2239 + // _type: type, + _id: id, + }, + }, + source, + ]; }, [] as any[]); }; diff --git a/packages/osd-opensearch-archiver/src/lib/docs/generate_doc_records_stream.ts b/packages/osd-opensearch-archiver/src/lib/docs/generate_doc_records_stream.ts index 10812419363a..47c8fb32f99a 100644 --- a/packages/osd-opensearch-archiver/src/lib/docs/generate_doc_records_stream.ts +++ b/packages/osd-opensearch-archiver/src/lib/docs/generate_doc_records_stream.ts @@ -87,7 +87,9 @@ export function createGenerateDocRecordsStream({ // always rewrite the .kibana_* index to .kibana_1 so that // when it is loaded it can skip migration, if possible index: hit._index.startsWith('.kibana') ? '.kibana_1' : hit._index, - type: hit._type, + // TODO: verify no BWC issues here + // Removed: https://github.com/opensearch-project/OpenSearch/pull/2239 + // type: hit._type, id: hit._id, source: hit._source, }, diff --git a/packages/osd-opensearch-archiver/src/lib/docs/index_doc_records_stream.ts b/packages/osd-opensearch-archiver/src/lib/docs/index_doc_records_stream.ts index 990f60f66a3e..5ad7c21c6cfd 100644 --- a/packages/osd-opensearch-archiver/src/lib/docs/index_doc_records_stream.ts +++ b/packages/osd-opensearch-archiver/src/lib/docs/index_doc_records_stream.ts @@ -50,7 +50,9 @@ export function createIndexDocRecordsStream( { [operation]: { _index: doc.index, - _type: doc.type, + // TODO: verify no BWC issues here + // Removed: https://github.com/opensearch-project/OpenSearch/pull/2239 + // _type: doc.type, _id: doc.id, }, }, diff --git a/test/functional/apps/management/_handle_version_conflict.js b/test/functional/apps/management/_handle_version_conflict.js index ed1c70633571..a170b5956c3f 100644 --- a/test/functional/apps/management/_handle_version_conflict.js +++ b/test/functional/apps/management/_handle_version_conflict.js @@ -66,7 +66,9 @@ export default function ({ getService, getPageObjects }) { await PageObjects.settings.setScriptedFieldScript(`doc['bytes'].value`); const response = await opensearch.update({ index: '.kibana', - type: '_doc', + // TODO: verify no BWC issues here + // Removed: https://github.com/opensearch-project/OpenSearch/pull/2239 + // type: '_doc', id: 'index-pattern:logstash-*', body: { doc: { 'index-pattern': { fieldFormatMap: '{"geo.src":{"id":"number"}}' } }, @@ -93,7 +95,9 @@ export default function ({ getService, getPageObjects }) { await PageObjects.settings.setFieldFormat('url'); const response = await opensearch.update({ index: '.kibana', - type: '_doc', + // TODO: verify no BWC issues here + // Removed: https://github.com/opensearch-project/OpenSearch/pull/2239 + // type: '_doc', id: 'index-pattern:logstash-*', body: { doc: { 'index-pattern': { fieldFormatMap: '{"geo.dest":{"id":"number"}}' } },