Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/commands/entity_store/entity_maintainers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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: {
Expand Down
5 changes: 2 additions & 3 deletions src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down