diff --git a/src/commands/entity_store/entity_maintainers.ts b/src/commands/entity_store/entity_maintainers.ts index 85da4de..fcd83a1 100644 --- a/src/commands/entity_store/entity_maintainers.ts +++ b/src/commands/entity_store/entity_maintainers.ts @@ -4,7 +4,7 @@ import { chunk } from 'lodash-es'; import { getEsClient } from '../utils/indices.ts'; import { bulkIngest, bulkUpsert } from '../shared/elasticsearch.ts'; import { - getEntityStoreV2Index, + getEntityStoreIndex, ENTITY_MAINTAINERS_OPTIONS, DEFAULT_CHUNK_SIZE, type EntityMaintainerOption, @@ -113,7 +113,7 @@ const fetchEntities = async ( const client = getEsClient(); const response = await client.search({ - index: getEntityStoreV2Index(space), + index: getEntityStoreIndex(space), size: count, sort: [{ '@timestamp': 'desc' }], query: { diff --git a/src/constants.ts b/src/constants.ts index f6540ef..d6cde31 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -16,10 +16,9 @@ export const ENTITY_STORE_OPTIONS = { apiEnrichment: 'apiEnrichment', } as const; -export const getEntityStoreV2Index = (space: string = 'default') => - `.entities.v2.latest.security_${space}`; +export const getEntityStoreIndex = (space: string = 'default') => `entities-latest-${space}`; -export const ENTITY_STORE_V2_INDEX = getEntityStoreV2Index(); +export const ENTITY_STORE_INDEX = getEntityStoreIndex(); export const ENTITY_MAINTAINERS_OPTIONS = { riskScore: 'riskScore', assetCriticality: 'assetCriticality',