diff --git a/src/_db/commands/reindex/shared/page.ts b/src/_db/commands/reindex/shared/page.ts index 627add47..92cfc6cc 100644 --- a/src/_db/commands/reindex/shared/page.ts +++ b/src/_db/commands/reindex/shared/page.ts @@ -98,7 +98,6 @@ export const makePageIndexer = (writeIndex: string) => async (result: Event[]) = body.push({ index: { _index: writeIndex, - _type: "_doc", }, }); body.push(eventToIndex); diff --git a/src/_processor/test/workers/ElasticsearchSaverTest.ts b/src/_processor/test/workers/ElasticsearchSaverTest.ts index 0287acd3..b6eb493b 100644 --- a/src/_processor/test/workers/ElasticsearchSaverTest.ts +++ b/src/_processor/test/workers/ElasticsearchSaverTest.ts @@ -118,7 +118,6 @@ class ElasticsearchSaverTest { x.index( TypeMoq.It.isValue({ index: "retraced.proj01.env01.current", - type: "_doc", body: expectedIndexed, id: expectedIndexed.canonical_time.toString() + "-" + expectedIndexed.id, }) diff --git a/src/_processor/workers/saveEventToElasticsearch.ts b/src/_processor/workers/saveEventToElasticsearch.ts index 8c9657f6..40627251 100644 --- a/src/_processor/workers/saveEventToElasticsearch.ts +++ b/src/_processor/workers/saveEventToElasticsearch.ts @@ -63,7 +63,6 @@ export class ElasticsearchSaver { private async esIndex(event: any, alias: string) { const resp = await this.es.index({ index: alias, - type: "_doc", body: event, id: event.id ? event.canonical_time.toString() + "-" + event.id : undefined, }); diff --git a/src/models/event/query.ts b/src/models/event/query.ts index 4d595147..81215d25 100644 --- a/src/models/event/query.ts +++ b/src/models/event/query.ts @@ -354,16 +354,6 @@ export function searchParams(opts: Options): API.Search_Request { ], }, }; - - // return { - // index, - // type: "_doc", - // _source: true, - // size: opts.size != 0 ? opts.size : undefined, - // sort: [`canonical_time: ${opts.sort}`], - // search_after: opts.cursor, - // body: { query }, - // }; } export function searchParamsPaginated(opts: OptionsPaginated): API.Search_Request { diff --git a/src/models/event/search.ts b/src/models/event/search.ts index 4cdcc970..1831a01c 100644 --- a/src/models/event/search.ts +++ b/src/models/event/search.ts @@ -188,7 +188,6 @@ export default async function (opts: Options): Promise { const params: any = { index: opts.index, - type: "_doc", _source: true, from: opts.offset || 0, size: opts.fetchAll ? 5000 : opts.length,