From c6fcde9a8bb28a361a6c8baf847874fe1140ecb6 Mon Sep 17 00:00:00 2001 From: Mikhail Shustov Date: Wed, 20 Oct 2021 16:46:37 +0200 Subject: [PATCH] [ES client] Rename deprecated params (#115528) * filterPath --> filter_path * ignoreUnavailable --> ignore_unavailable * ignoreUnavailable --> ignore_unavailable * trackScores --> track_scores * trackTotalHits --> track_total_hits * rollback unnecessary changes --- .../server/fetcher/lib/es_api.test.js | 4 +-- .../get_saved_object_counts.test.ts | 12 +++---- .../get_saved_object_counts.ts | 4 +-- .../collectors/custom_element_collector.ts | 4 +-- .../server/collectors/workpad_collector.ts | 4 +-- .../log_entries/kibana_log_entries_adapter.ts | 8 ++--- .../adapters/metrics/lib/check_valid_node.ts | 4 +-- .../elasticsearch_source_status_adapter.ts | 4 +-- .../queries/log_entry_datasets.ts | 8 ++--- .../server/lib/infra_ml/queries/common.ts | 8 ++--- .../queries/metrics_host_anomalies.test.ts | 8 ++--- .../queries/metrics_k8s_anomalies.test.ts | 8 ++--- .../server/lib/log_analysis/queries/common.ts | 8 ++--- .../plugins/infra/server/lib/metrics/index.ts | 4 +-- .../infra/server/lib/sources/has_data.ts | 4 +-- .../lib/get_cloud_metadata.ts | 4 +-- .../metadata/lib/get_cloud_metric_metadata.ts | 4 +-- .../metadata/lib/get_metric_metadata.ts | 4 +-- .../routes/metadata/lib/get_node_info.ts | 4 +-- .../routes/metadata/lib/get_pod_node_name.ts | 4 +-- .../lib/get_dataset_for_field.ts | 4 +-- .../lib/query_total_groupings.ts | 4 +-- .../server/utils/calculate_metric_interval.ts | 4 +-- .../lib/elasticsearch/get_last_recovery.ts | 2 +- .../actions/all/query.all_actions.dsl.ts | 4 +-- .../details/query.action_details.dsl.ts | 4 +-- .../results/query.action_results.dsl.ts | 4 +-- .../factory/agents/query.all_agents.dsl.ts | 4 +-- .../factory/results/query.all_results.dsl.ts | 4 +-- .../server/usage/get_reporting_usage.ts | 2 +- .../rollup/server/collectors/helpers.ts | 4 +-- .../factory/cti/event_enrichment/query.ts | 4 +-- .../cti/event_enrichment/response.test.ts | 4 +-- .../factory/hosts/all/__mocks__/index.ts | 8 ++--- .../factory/hosts/all/query.all_hosts.dsl.ts | 4 +-- .../hosts/all/query.all_hosts_entities.dsl.ts | 4 +-- .../hosts/authentications/__mocks__/index.ts | 8 ++--- .../hosts/authentications/dsl/query.dsl.ts | 4 +-- .../authentications/dsl/query_entities.dsl.ts | 4 +-- .../factory/hosts/details/__mocks__/index.ts | 8 ++--- .../hosts/details/query.host_details.dsl.ts | 4 +-- .../query.hosts_kpi_authentications.dsl.ts | 4 +-- ....hosts_kpi_authentications_entities.dsl.ts | 4 +-- .../kpi/hosts/query.hosts_kpi_hosts.dsl.ts | 4 +-- .../query.hosts_kpi_hosts_entities.dsl.ts | 4 +-- .../query.hosts_kpi_unique_ips.dsl.ts | 4 +-- ...query.hosts_kpi_unique_ips_entities.dsl.ts | 4 +-- .../hosts/last_first_seen/__mocks__/index.ts | 12 +++---- .../query.first_or_last_seen_host.dsl.ts | 4 +-- .../factory/hosts/overview/__mocks__/index.ts | 8 ++--- .../hosts/overview/query.overview_host.dsl.ts | 4 +-- .../hosts/risk_score/query.hosts_risk.dsl.ts | 4 +-- .../uncommon_processes/__mocks__/index.ts | 8 ++--- .../hosts/uncommon_processes/dsl/query.dsl.ts | 4 +-- .../matrix_histogram/__mocks__/index.ts | 24 +++++++------- .../alerts/__mocks__/index.ts | 4 +-- .../alerts/query.alerts_histogram.dsl.ts | 4 +-- .../anomalies/__mocks__/index.ts | 4 +-- .../query.anomalies_histogram.dsl.ts | 4 +-- .../authentications/__mocks__/index.ts | 4 +-- .../query.authentications_histogram.dsl.ts | 4 +-- ....authentications_histogram_entities.dsl.ts | 4 +-- .../matrix_histogram/dns/__mocks__/index.ts | 4 +-- .../dns/query.dns_histogram.dsl.ts | 4 +-- .../events/__mocks__/index.ts | 32 +++++++++---------- .../events/query.events_histogram.dsl.ts | 4 +-- .../network/details/__mocks__/index.ts | 8 ++--- .../details/query.details_network.dsl.ts | 4 +-- .../factory/network/dns/__mocks__/index.ts | 8 ++--- .../network/dns/query.dns_network.dsl.ts | 4 +-- .../factory/network/http/__mocks__/index.ts | 8 ++--- .../network/http/query.http_network.dsl.ts | 4 +-- .../dns/query.network_kip_dns_entities.dsl.ts | 4 +-- .../kpi/dns/query.network_kpi_dns.dsl.ts | 4 +-- .../query.network_kpi_network_events.dsl.ts | 4 +-- ...network_kpi_network_events_entities.dsl.ts | 4 +-- .../query.network_kpi_tls_handshakes.dsl.ts | 4 +-- ...network_kpi_tls_handshakes_entities.dsl.ts | 4 +-- .../query.network_kpi_unique_flows.dsl.ts | 4 +-- ...uery.network_kpi_unique_private_ips.dsl.ts | 4 +-- ...ork_kpi_unique_private_ips_entities.dsl.ts | 4 +-- .../network/overview/__mocks__/index.ts | 8 ++--- .../overview/query.overview_network.dsl.ts | 4 +-- .../factory/network/tls/__mocks__/index.ts | 8 ++--- .../network/tls/query.tls_network.dsl.ts | 4 +-- .../network/top_countries/__mocks__/index.ts | 8 ++--- .../query.top_countries_network.dsl.ts | 4 +-- ...uery.top_countries_network_entities.dsl.ts | 4 +-- .../network/top_n_flow/__mocks__/index.ts | 8 ++--- .../query.top_n_flow_network.dsl.ts | 4 +-- .../query.top_n_flow_network_entities.dsl.ts | 4 +-- .../factory/network/users/__mocks__/index.ts | 8 ++--- .../network/users/query.users_network.dsl.ts | 4 +-- .../ueba/host_rules/query.host_rules.dsl.ts | 4 +-- .../host_tactics/query.host_tactics.dsl.ts | 4 +-- .../ueba/risk_score/query.risk_score.dsl.ts | 4 +-- .../ueba/user_rules/query.user_rules.dsl.ts | 4 +-- .../detections/detection_rule_helpers.ts | 4 +-- .../server/usage/detections/types.ts | 4 +-- .../events/all/query.events_all.dsl.ts | 4 +-- .../details/query.events_details.dsl.test.ts | 4 +-- .../details/query.events_details.dsl.ts | 4 +-- .../factory/events/kpi/query.kpi.dsl.ts | 4 +-- .../query.events_last_event_time.dsl.ts | 12 +++---- 104 files changed, 280 insertions(+), 280 deletions(-) diff --git a/src/plugins/data_views/server/fetcher/lib/es_api.test.js b/src/plugins/data_views/server/fetcher/lib/es_api.test.js index 2893fde671bb2..085add965b921 100644 --- a/src/plugins/data_views/server/fetcher/lib/es_api.test.js +++ b/src/plugins/data_views/server/fetcher/lib/es_api.test.js @@ -61,7 +61,7 @@ describe('server/index_patterns/service/lib/es_api', () => { expect(resp).toBe(football); }); - it('sets ignoreUnavailable and allowNoIndices params', async () => { + it('sets ignore_unavailable and allow_no_indices params', async () => { const getAlias = sinon.stub(); const callCluster = { indices: { @@ -149,7 +149,7 @@ describe('server/index_patterns/service/lib/es_api', () => { expect(resp).toBe(football); }); - it('sets ignoreUnavailable, allowNoIndices, and fields params', async () => { + it('sets ignore_unavailable, allow_no_indices, and fields params', async () => { const fieldCaps = sinon.stub(); const callCluster = { indices: { diff --git a/src/plugins/kibana_usage_collection/server/collectors/saved_objects_counts/get_saved_object_counts.test.ts b/src/plugins/kibana_usage_collection/server/collectors/saved_objects_counts/get_saved_object_counts.test.ts index 94c618354fc37..4b3421efed96e 100644 --- a/src/plugins/kibana_usage_collection/server/collectors/saved_objects_counts/get_saved_object_counts.test.ts +++ b/src/plugins/kibana_usage_collection/server/collectors/saved_objects_counts/get_saved_object_counts.test.ts @@ -26,8 +26,8 @@ describe('getSavedObjectsCounts', () => { expect(results).toStrictEqual([]); expect(esClient.search).toHaveBeenCalledWith({ index: '.kibana', - ignoreUnavailable: true, - filterPath: 'aggregations.types.buckets', + ignore_unavailable: true, + filter_path: 'aggregations.types.buckets', body: { size: 0, query: { match_all: {} }, @@ -41,8 +41,8 @@ describe('getSavedObjectsCounts', () => { await getSavedObjectsCounts(esClient, '.kibana'); expect(esClient.search).toHaveBeenCalledWith({ index: '.kibana', - ignoreUnavailable: true, - filterPath: 'aggregations.types.buckets', + ignore_unavailable: true, + filter_path: 'aggregations.types.buckets', body: { size: 0, query: { match_all: {} }, @@ -56,8 +56,8 @@ describe('getSavedObjectsCounts', () => { await getSavedObjectsCounts(esClient, '.kibana', ['type_one', 'type_two']); expect(esClient.search).toHaveBeenCalledWith({ index: '.kibana', - ignoreUnavailable: true, - filterPath: 'aggregations.types.buckets', + ignore_unavailable: true, + filter_path: 'aggregations.types.buckets', body: { size: 0, query: { terms: { type: ['type_one', 'type_two'] } }, diff --git a/src/plugins/kibana_usage_collection/server/collectors/saved_objects_counts/get_saved_object_counts.ts b/src/plugins/kibana_usage_collection/server/collectors/saved_objects_counts/get_saved_object_counts.ts index eeaeed67e753f..f82a803b763c5 100644 --- a/src/plugins/kibana_usage_collection/server/collectors/saved_objects_counts/get_saved_object_counts.ts +++ b/src/plugins/kibana_usage_collection/server/collectors/saved_objects_counts/get_saved_object_counts.ts @@ -17,8 +17,8 @@ export async function getSavedObjectsCounts( const savedObjectCountSearchParams = { index: kibanaIndex, - ignoreUnavailable: true, - filterPath: 'aggregations.types.buckets', + ignore_unavailable: true, + filter_path: 'aggregations.types.buckets', body: { size: 0, query, diff --git a/x-pack/plugins/canvas/server/collectors/custom_element_collector.ts b/x-pack/plugins/canvas/server/collectors/custom_element_collector.ts index 18cfe1a3df56c..b0e219a4d886d 100644 --- a/x-pack/plugins/canvas/server/collectors/custom_element_collector.ts +++ b/x-pack/plugins/canvas/server/collectors/custom_element_collector.ts @@ -147,8 +147,8 @@ const customElementCollector: TelemetryCollector = async function customElementC const customElementParams = { size: 10000, index: kibanaIndex, - ignoreUnavailable: true, - filterPath: [`hits.hits._source.${CUSTOM_ELEMENT_TYPE}.content`], + ignore_unavailable: true, + filter_path: [`hits.hits._source.${CUSTOM_ELEMENT_TYPE}.content`], body: { query: { bool: { filter: { term: { type: CUSTOM_ELEMENT_TYPE } } } } }, }; diff --git a/x-pack/plugins/canvas/server/collectors/workpad_collector.ts b/x-pack/plugins/canvas/server/collectors/workpad_collector.ts index d42b8480ed7c7..62b0ce200e320 100644 --- a/x-pack/plugins/canvas/server/collectors/workpad_collector.ts +++ b/x-pack/plugins/canvas/server/collectors/workpad_collector.ts @@ -381,8 +381,8 @@ const workpadCollector: TelemetryCollector = async function (kibanaIndex, esClie const searchParams = { size: 10000, // elasticsearch index.max_result_window default value index: kibanaIndex, - ignoreUnavailable: true, - filterPath: ['hits.hits._source.canvas-workpad', '-hits.hits._source.canvas-workpad.assets'], + ignore_unavailable: true, + filter_path: ['hits.hits._source.canvas-workpad', '-hits.hits._source.canvas-workpad.assets'], body: { query: { bool: { filter: { term: { type: CANVAS_TYPE } } } } }, }; diff --git a/x-pack/plugins/infra/server/lib/adapters/log_entries/kibana_log_entries_adapter.ts b/x-pack/plugins/infra/server/lib/adapters/log_entries/kibana_log_entries_adapter.ts index ab98de7901a3d..524658559eadf 100644 --- a/x-pack/plugins/infra/server/lib/adapters/log_entries/kibana_log_entries_adapter.ts +++ b/x-pack/plugins/infra/server/lib/adapters/log_entries/kibana_log_entries_adapter.ts @@ -69,9 +69,9 @@ export class InfraKibanaLogEntriesAdapter implements LogEntriesAdapter { }; const esQuery = { - allowNoIndices: true, + allow_no_indices: true, index: resolvedLogSourceConfiguration.indices, - ignoreUnavailable: true, + ignore_unavailable: true, body: { size: size + 1, // Extra one to test if it has more before or after track_total_hits: false, @@ -139,9 +139,9 @@ export class InfraKibanaLogEntriesAdapter implements LogEntriesAdapter { ); const query = { - allowNoIndices: true, + allow_no_indices: true, index: resolvedLogSourceConfiguration.indices, - ignoreUnavailable: true, + ignore_unavailable: true, body: { aggregations: { count_by_date: { diff --git a/x-pack/plugins/infra/server/lib/adapters/metrics/lib/check_valid_node.ts b/x-pack/plugins/infra/server/lib/adapters/metrics/lib/check_valid_node.ts index f53016561dc5b..f2b7691646e48 100644 --- a/x-pack/plugins/infra/server/lib/adapters/metrics/lib/check_valid_node.ts +++ b/x-pack/plugins/infra/server/lib/adapters/metrics/lib/check_valid_node.ts @@ -14,8 +14,8 @@ export const checkValidNode = async ( id: string ): Promise => { const params = { - allowNoIndices: true, - ignoreUnavailable: true, + allow_no_indices: true, + ignore_unavailable: true, index: indexPattern, terminateAfter: 1, body: { diff --git a/x-pack/plugins/infra/server/lib/adapters/source_status/elasticsearch_source_status_adapter.ts b/x-pack/plugins/infra/server/lib/adapters/source_status/elasticsearch_source_status_adapter.ts index 0aa305a580ffa..9c15d4746cdc5 100644 --- a/x-pack/plugins/infra/server/lib/adapters/source_status/elasticsearch_source_status_adapter.ts +++ b/x-pack/plugins/infra/server/lib/adapters/source_status/elasticsearch_source_status_adapter.ts @@ -18,13 +18,13 @@ export class InfraElasticsearchSourceStatusAdapter implements InfraSourceStatusA this.framework .callWithRequest(requestContext, 'indices.getAlias', { name: aliasName, - filterPath: '*.settings.index.uuid', // to keep the response size as small as possible + filter_path: '*.settings.index.uuid', // to keep the response size as small as possible }) .catch(withDefaultIfNotFound({})), this.framework .callWithRequest(requestContext, 'indices.get', { index: aliasName, - filterPath: '*.settings.index.uuid', // to keep the response size as small as possible + filter_path: '*.settings.index.uuid', // to keep the response size as small as possible }) .catch(withDefaultIfNotFound({})), ]); diff --git a/x-pack/plugins/infra/server/lib/domains/log_entries_domain/queries/log_entry_datasets.ts b/x-pack/plugins/infra/server/lib/domains/log_entries_domain/queries/log_entry_datasets.ts index 3431f3bfb0c8c..9eae8daa3e74f 100644 --- a/x-pack/plugins/infra/server/lib/domains/log_entries_domain/queries/log_entry_datasets.ts +++ b/x-pack/plugins/infra/server/lib/domains/log_entries_domain/queries/log_entry_datasets.ts @@ -65,10 +65,10 @@ export const createLogEntryDatasetsQuery = ( }); const defaultRequestParameters = { - allowNoIndices: true, - ignoreUnavailable: true, - trackScores: false, - trackTotalHits: false, + allow_no_indices: true, + ignore_unavailable: true, + track_scores: false, + track_total_hits: false, }; const compositeDatasetKeyRT = rt.type({ diff --git a/x-pack/plugins/infra/server/lib/infra_ml/queries/common.ts b/x-pack/plugins/infra/server/lib/infra_ml/queries/common.ts index f4088c56303e2..594dc3371f3a2 100644 --- a/x-pack/plugins/infra/server/lib/infra_ml/queries/common.ts +++ b/x-pack/plugins/infra/server/lib/infra_ml/queries/common.ts @@ -6,10 +6,10 @@ */ export const defaultRequestParameters = { - allowNoIndices: true, - ignoreUnavailable: true, - trackScores: false, - trackTotalHits: false, + allow_no_indices: true, + ignore_unavailable: true, + track_scores: false, + track_total_hits: false, }; export const createJobIdFilters = (jobId: string) => [ diff --git a/x-pack/plugins/infra/server/lib/infra_ml/queries/metrics_host_anomalies.test.ts b/x-pack/plugins/infra/server/lib/infra_ml/queries/metrics_host_anomalies.test.ts index 7c281963e5717..5e7cb78790de0 100644 --- a/x-pack/plugins/infra/server/lib/infra_ml/queries/metrics_host_anomalies.test.ts +++ b/x-pack/plugins/infra/server/lib/infra_ml/queries/metrics_host_anomalies.test.ts @@ -27,10 +27,10 @@ describe('createMetricsHostAnomaliesQuery', () => { pagination, }) ).toMatchObject({ - allowNoIndices: true, - ignoreUnavailable: true, - trackScores: false, - trackTotalHits: false, + allow_no_indices: true, + ignore_unavailable: true, + track_scores: false, + track_total_hits: false, body: { query: { bool: { diff --git a/x-pack/plugins/infra/server/lib/infra_ml/queries/metrics_k8s_anomalies.test.ts b/x-pack/plugins/infra/server/lib/infra_ml/queries/metrics_k8s_anomalies.test.ts index 61efb896a6c89..959b20a482544 100644 --- a/x-pack/plugins/infra/server/lib/infra_ml/queries/metrics_k8s_anomalies.test.ts +++ b/x-pack/plugins/infra/server/lib/infra_ml/queries/metrics_k8s_anomalies.test.ts @@ -27,10 +27,10 @@ describe('createMetricsK8sAnomaliesQuery', () => { pagination, }) ).toMatchObject({ - allowNoIndices: true, - ignoreUnavailable: true, - trackScores: false, - trackTotalHits: false, + allow_no_indices: true, + ignore_unavailable: true, + track_scores: false, + track_total_hits: false, body: { query: { bool: { diff --git a/x-pack/plugins/infra/server/lib/log_analysis/queries/common.ts b/x-pack/plugins/infra/server/lib/log_analysis/queries/common.ts index 4c3ba5612c443..b05e4ce00fe9c 100644 --- a/x-pack/plugins/infra/server/lib/log_analysis/queries/common.ts +++ b/x-pack/plugins/infra/server/lib/log_analysis/queries/common.ts @@ -6,10 +6,10 @@ */ export const defaultRequestParameters = { - allowNoIndices: true, - ignoreUnavailable: true, - trackScores: false, - trackTotalHits: false, + allow_no_indices: true, + ignore_unavailable: true, + track_scores: false, + track_total_hits: false, }; export const createJobIdFilters = (jobId: string) => [ diff --git a/x-pack/plugins/infra/server/lib/metrics/index.ts b/x-pack/plugins/infra/server/lib/metrics/index.ts index 131f6944b0484..d291dbf88b49a 100644 --- a/x-pack/plugins/infra/server/lib/metrics/index.ts +++ b/x-pack/plugins/infra/server/lib/metrics/index.ts @@ -47,8 +47,8 @@ export const query = async ( ]; const params = { - allowNoIndices: true, - ignoreUnavailable: true, + allow_no_indices: true, + ignore_unavailable: true, index: options.indexPattern, body: { size: 0, diff --git a/x-pack/plugins/infra/server/lib/sources/has_data.ts b/x-pack/plugins/infra/server/lib/sources/has_data.ts index b036124344ea9..d56512918f11a 100644 --- a/x-pack/plugins/infra/server/lib/sources/has_data.ts +++ b/x-pack/plugins/infra/server/lib/sources/has_data.ts @@ -10,9 +10,9 @@ import { ESSearchClient } from '../metrics/types'; export const hasData = async (index: string, client: ESSearchClient) => { const params = { index, - allowNoIndices: true, + allow_no_indices: true, terminate_after: 1, - ignoreUnavailable: true, + ignore_unavailable: true, body: { size: 0, }, diff --git a/x-pack/plugins/infra/server/routes/inventory_metadata/lib/get_cloud_metadata.ts b/x-pack/plugins/infra/server/routes/inventory_metadata/lib/get_cloud_metadata.ts index 57f99aee6d187..c721ca75ea978 100644 --- a/x-pack/plugins/infra/server/routes/inventory_metadata/lib/get_cloud_metadata.ts +++ b/x-pack/plugins/infra/server/routes/inventory_metadata/lib/get_cloud_metadata.ts @@ -40,8 +40,8 @@ export const getCloudMetadata = async ( } const metricQuery = { - allowNoIndices: true, - ignoreUnavailable: true, + allow_no_indices: true, + ignore_unavailable: true, index: sourceConfiguration.metricAlias, body: { query: { diff --git a/x-pack/plugins/infra/server/routes/metadata/lib/get_cloud_metric_metadata.ts b/x-pack/plugins/infra/server/routes/metadata/lib/get_cloud_metric_metadata.ts index be2a39b84ef1c..d9da7bce2246f 100644 --- a/x-pack/plugins/infra/server/routes/metadata/lib/get_cloud_metric_metadata.ts +++ b/x-pack/plugins/infra/server/routes/metadata/lib/get_cloud_metric_metadata.ts @@ -26,8 +26,8 @@ export const getCloudMetricsMetadata = async ( timeRange: { from: number; to: number } ): Promise => { const metricQuery = { - allowNoIndices: true, - ignoreUnavailable: true, + allow_no_indices: true, + ignore_unavailable: true, index: sourceConfiguration.metricAlias, body: { query: { diff --git a/x-pack/plugins/infra/server/routes/metadata/lib/get_metric_metadata.ts b/x-pack/plugins/infra/server/routes/metadata/lib/get_metric_metadata.ts index 26bcf267ad6cc..bfa0884bfe199 100644 --- a/x-pack/plugins/infra/server/routes/metadata/lib/get_metric_metadata.ts +++ b/x-pack/plugins/infra/server/routes/metadata/lib/get_metric_metadata.ts @@ -32,8 +32,8 @@ export const getMetricMetadata = async ( ): Promise => { const fields = findInventoryFields(nodeType, sourceConfiguration.fields); const metricQuery = { - allowNoIndices: true, - ignoreUnavailable: true, + allow_no_indices: true, + ignore_unavailable: true, index: sourceConfiguration.metricAlias, body: { query: { diff --git a/x-pack/plugins/infra/server/routes/metadata/lib/get_node_info.ts b/x-pack/plugins/infra/server/routes/metadata/lib/get_node_info.ts index fccbead2832c9..06035ed40adf1 100644 --- a/x-pack/plugins/infra/server/routes/metadata/lib/get_node_info.ts +++ b/x-pack/plugins/infra/server/routes/metadata/lib/get_node_info.ts @@ -53,8 +53,8 @@ export const getNodeInfo = async ( const fields = findInventoryFields(nodeType, sourceConfiguration.fields); const timestampField = sourceConfiguration.fields.timestamp; const params = { - allowNoIndices: true, - ignoreUnavailable: true, + allow_no_indices: true, + ignore_unavailable: true, terminateAfter: 1, index: sourceConfiguration.metricAlias, body: { diff --git a/x-pack/plugins/infra/server/routes/metadata/lib/get_pod_node_name.ts b/x-pack/plugins/infra/server/routes/metadata/lib/get_pod_node_name.ts index 8e4c707d9b467..9bf809ba3b3f4 100644 --- a/x-pack/plugins/infra/server/routes/metadata/lib/get_pod_node_name.ts +++ b/x-pack/plugins/infra/server/routes/metadata/lib/get_pod_node_name.ts @@ -22,8 +22,8 @@ export const getPodNodeName = async ( const fields = findInventoryFields(nodeType, sourceConfiguration.fields); const timestampField = sourceConfiguration.fields.timestamp; const params = { - allowNoIndices: true, - ignoreUnavailable: true, + allow_no_indices: true, + ignore_unavailable: true, terminateAfter: 1, index: sourceConfiguration.metricAlias, body: { diff --git a/x-pack/plugins/infra/server/routes/metrics_explorer/lib/get_dataset_for_field.ts b/x-pack/plugins/infra/server/routes/metrics_explorer/lib/get_dataset_for_field.ts index b88472fbb4b14..be25bbbf022ee 100644 --- a/x-pack/plugins/infra/server/routes/metrics_explorer/lib/get_dataset_for_field.ts +++ b/x-pack/plugins/infra/server/routes/metrics_explorer/lib/get_dataset_for_field.ts @@ -22,8 +22,8 @@ export const getDatasetForField = async ( timerange: { field: string; to: number; from: number } ) => { const params = { - allowNoIndices: true, - ignoreUnavailable: true, + allow_no_indices: true, + ignore_unavailable: true, terminateAfter: 1, index: indexPattern, body: { diff --git a/x-pack/plugins/infra/server/routes/metrics_explorer/lib/query_total_groupings.ts b/x-pack/plugins/infra/server/routes/metrics_explorer/lib/query_total_groupings.ts index b871fa21c111d..a2bf778d5016d 100644 --- a/x-pack/plugins/infra/server/routes/metrics_explorer/lib/query_total_groupings.ts +++ b/x-pack/plugins/infra/server/routes/metrics_explorer/lib/query_total_groupings.ts @@ -41,8 +41,8 @@ export const queryTotalGroupings = async ( } const params = { - allowNoIndices: true, - ignoreUnavailable: true, + allow_no_indices: true, + ignore_unavailable: true, index: options.indexPattern, body: { size: 0, diff --git a/x-pack/plugins/infra/server/utils/calculate_metric_interval.ts b/x-pack/plugins/infra/server/utils/calculate_metric_interval.ts index 13a108b76b6a4..3357b1a842183 100644 --- a/x-pack/plugins/infra/server/utils/calculate_metric_interval.ts +++ b/x-pack/plugins/infra/server/utils/calculate_metric_interval.ts @@ -35,9 +35,9 @@ export const calculateMetricInterval = async ( from = options.timerange.to - inventoryModel.metrics.defaultTimeRangeInSeconds * 1000; } const query = { - allowNoIndices: true, + allow_no_indices: true, index: options.indexPattern, - ignoreUnavailable: true, + ignore_unavailable: true, body: { query: { bool: { diff --git a/x-pack/plugins/monitoring/server/lib/elasticsearch/get_last_recovery.ts b/x-pack/plugins/monitoring/server/lib/elasticsearch/get_last_recovery.ts index 43527f875cf72..974ffad7745d9 100644 --- a/x-pack/plugins/monitoring/server/lib/elasticsearch/get_last_recovery.ts +++ b/x-pack/plugins/monitoring/server/lib/elasticsearch/get_last_recovery.ts @@ -107,7 +107,7 @@ export async function getLastRecovery(req: LegacyRequest, esIndexPattern: string const mbParams = { index: esIndexPattern, size, - ignoreUnavailable: true, + ignore_unavailable: true, body: { _source: ['elasticsearch.index.recovery', '@timestamp'], sort: { timestamp: { order: 'desc', unmapped_type: 'long' } }, diff --git a/x-pack/plugins/osquery/server/search_strategy/osquery/factory/actions/all/query.all_actions.dsl.ts b/x-pack/plugins/osquery/server/search_strategy/osquery/factory/actions/all/query.all_actions.dsl.ts index 55bec687d3e2c..8dc8fad02a7c1 100644 --- a/x-pack/plugins/osquery/server/search_strategy/osquery/factory/actions/all/query.all_actions.dsl.ts +++ b/x-pack/plugins/osquery/server/search_strategy/osquery/factory/actions/all/query.all_actions.dsl.ts @@ -20,9 +20,9 @@ export const buildActionsQuery = ({ // const filter = [...createQueryFilterClauses(filterQuery)]; const dslQuery = { - allowNoIndices: true, + allow_no_indices: true, index: '.fleet-actions', - ignoreUnavailable: true, + ignore_unavailable: true, body: { // query: { bool: { filter } }, query: { diff --git a/x-pack/plugins/osquery/server/search_strategy/osquery/factory/actions/details/query.action_details.dsl.ts b/x-pack/plugins/osquery/server/search_strategy/osquery/factory/actions/details/query.action_details.dsl.ts index bc9d63e619338..41f2875b1d4c8 100644 --- a/x-pack/plugins/osquery/server/search_strategy/osquery/factory/actions/details/query.action_details.dsl.ts +++ b/x-pack/plugins/osquery/server/search_strategy/osquery/factory/actions/details/query.action_details.dsl.ts @@ -23,9 +23,9 @@ export const buildActionDetailsQuery = ({ ]; const dslQuery = { - allowNoIndices: true, + allow_no_indices: true, index: '.fleet-actions', - ignoreUnavailable: true, + ignore_unavailable: true, body: { query: { bool: { filter } }, size: 1, diff --git a/x-pack/plugins/osquery/server/search_strategy/osquery/factory/actions/results/query.action_results.dsl.ts b/x-pack/plugins/osquery/server/search_strategy/osquery/factory/actions/results/query.action_results.dsl.ts index d74067bff0251..109e260911933 100644 --- a/x-pack/plugins/osquery/server/search_strategy/osquery/factory/actions/results/query.action_results.dsl.ts +++ b/x-pack/plugins/osquery/server/search_strategy/osquery/factory/actions/results/query.action_results.dsl.ts @@ -25,9 +25,9 @@ export const buildActionResultsQuery = ({ ]; const dslQuery = { - allowNoIndices: true, + allow_no_indices: true, index: '.fleet-actions-results*', - ignoreUnavailable: true, + ignore_unavailable: true, body: { aggs: { aggs: { diff --git a/x-pack/plugins/osquery/server/search_strategy/osquery/factory/agents/query.all_agents.dsl.ts b/x-pack/plugins/osquery/server/search_strategy/osquery/factory/agents/query.all_agents.dsl.ts index 52101462270c7..314de574f0a70 100644 --- a/x-pack/plugins/osquery/server/search_strategy/osquery/factory/agents/query.all_agents.dsl.ts +++ b/x-pack/plugins/osquery/server/search_strategy/osquery/factory/agents/query.all_agents.dsl.ts @@ -21,9 +21,9 @@ export const buildAgentsQuery = ({ ]; const dslQuery = { - allowNoIndices: true, + allow_no_indices: true, index: '.fleet-agents', - ignoreUnavailable: true, + ignore_unavailable: true, body: { query: { bool: { diff --git a/x-pack/plugins/osquery/server/search_strategy/osquery/factory/results/query.all_results.dsl.ts b/x-pack/plugins/osquery/server/search_strategy/osquery/factory/results/query.all_results.dsl.ts index 406ff26991f0e..59326d6c50155 100644 --- a/x-pack/plugins/osquery/server/search_strategy/osquery/factory/results/query.all_results.dsl.ts +++ b/x-pack/plugins/osquery/server/search_strategy/osquery/factory/results/query.all_results.dsl.ts @@ -36,9 +36,9 @@ export const buildResultsQuery = ({ ]; const dslQuery = { - allowNoIndices: true, + allow_no_indices: true, index: `logs-${OSQUERY_INTEGRATION_NAME}.result*`, - ignoreUnavailable: true, + ignore_unavailable: true, body: { aggs: { count_by_agent_id: { diff --git a/x-pack/plugins/reporting/server/usage/get_reporting_usage.ts b/x-pack/plugins/reporting/server/usage/get_reporting_usage.ts index 69213d8f8cacc..b2c6aece924f2 100644 --- a/x-pack/plugins/reporting/server/usage/get_reporting_usage.ts +++ b/x-pack/plugins/reporting/server/usage/get_reporting_usage.ts @@ -148,7 +148,7 @@ export async function getReportingUsage( const reportingIndex = REPORTING_SYSTEM_INDEX; const params = { index: `${reportingIndex}-*`, - filterPath: 'aggregations.*.buckets', + filter_path: 'aggregations.*.buckets', body: { size: 0, aggs: { diff --git a/x-pack/plugins/rollup/server/collectors/helpers.ts b/x-pack/plugins/rollup/server/collectors/helpers.ts index b6e5bc190d972..b007bbbff7e4a 100644 --- a/x-pack/plugins/rollup/server/collectors/helpers.ts +++ b/x-pack/plugins/rollup/server/collectors/helpers.ts @@ -32,8 +32,8 @@ export async function fetchRollupIndexPatterns(kibanaIndex: string, esClient: El const searchParams = { size: ES_MAX_RESULT_WINDOW_DEFAULT_VALUE, index: kibanaIndex, - ignoreUnavailable: true, - filterPath: ['hits.hits._id'], + ignore_unavailable: true, + filter_path: ['hits.hits._id'], body: { query: { bool: { diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/cti/event_enrichment/query.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/cti/event_enrichment/query.ts index 786f9a20f77e5..ea015ea145b3f 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/cti/event_enrichment/query.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/cti/event_enrichment/query.ts @@ -28,8 +28,8 @@ export const buildEventEnrichmentQuery: SecuritySolutionFactory { const parsedResponse = await parseEventEnrichmentResponse(options, response); const expectedInspect = expect.objectContaining({ - allowNoIndices: true, + allow_no_indices: true, body: { _source: false, fields: ['*'], @@ -57,7 +57,7 @@ describe('parseEventEnrichmentResponse', () => { }, }, }, - ignoreUnavailable: true, + ignore_unavailable: true, index: ['filebeat-*'], }); const parsedInspect = JSON.parse(parsedResponse.inspect.dsl[0]); diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/all/__mocks__/index.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/all/__mocks__/index.ts index 0369f182a4c75..d6e456e706673 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/all/__mocks__/index.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/all/__mocks__/index.ts @@ -611,7 +611,7 @@ export const formattedSearchStrategyResponse = { dsl: [ JSON.stringify( { - allowNoIndices: true, + allow_no_indices: true, index: [ 'apm-*-transaction*', 'traces-apm*', @@ -622,7 +622,7 @@ export const formattedSearchStrategyResponse = { 'packetbeat-*', 'winlogbeat-*', ], - ignoreUnavailable: true, + ignore_unavailable: true, track_total_hits: false, body: { docvalue_fields: mockOptions.docValueFields, @@ -783,7 +783,7 @@ export const mockBuckets: HostAggEsItem = { }; export const expectedDsl = { - allowNoIndices: true, + allow_no_indices: true, track_total_hits: false, body: { aggregations: { @@ -821,7 +821,7 @@ export const expectedDsl = { docvalue_fields: mockOptions.docValueFields, size: 0, }, - ignoreUnavailable: true, + ignore_unavailable: true, index: [ 'apm-*-transaction*', 'traces-apm*', diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/all/query.all_hosts.dsl.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/all/query.all_hosts.dsl.ts index 5d8540f886077..bc405e89bf7a6 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/all/query.all_hosts.dsl.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/all/query.all_hosts.dsl.ts @@ -40,9 +40,9 @@ export const buildHostsQuery = ({ const agg = { host_count: { cardinality: { field: 'host.name' } } }; const dslQuery = { - allowNoIndices: true, + allow_no_indices: true, index: defaultIndex, - ignoreUnavailable: true, + ignore_unavailable: true, track_total_hits: false, body: { ...(!isEmpty(docValueFields) ? { docvalue_fields: docValueFields } : {}), diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/all/query.all_hosts_entities.dsl.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/all/query.all_hosts_entities.dsl.ts index 1c338998e3b65..94124bc9567b7 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/all/query.all_hosts_entities.dsl.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/all/query.all_hosts_entities.dsl.ts @@ -40,9 +40,9 @@ export const buildHostsQueryEntities = ({ const agg = { host_count: { cardinality: { field: 'host.name' } } }; const dslQuery = { - allowNoIndices: true, + allow_no_indices: true, index: defaultIndex, - ignoreUnavailable: true, + ignore_unavailable: true, track_total_hits: false, body: { ...(!isEmpty(docValueFields) ? { docvalue_fields: docValueFields } : {}), diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/authentications/__mocks__/index.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/authentications/__mocks__/index.ts index 1dd3dc8ee4cff..bdc4755c6a02b 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/authentications/__mocks__/index.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/authentications/__mocks__/index.ts @@ -2149,7 +2149,7 @@ export const formattedSearchStrategyResponse = { dsl: [ JSON.stringify( { - allowNoIndices: true, + allow_no_indices: true, index: [ 'apm-*-transaction*', 'traces-apm*', @@ -2160,7 +2160,7 @@ export const formattedSearchStrategyResponse = { 'packetbeat-*', 'winlogbeat-*', ], - ignoreUnavailable: true, + ignore_unavailable: true, body: { docvalue_fields: mockOptions.docValueFields, aggregations: { @@ -2371,7 +2371,7 @@ export const formattedSearchStrategyResponse = { }; export const expectedDsl = { - allowNoIndices: true, + allow_no_indices: true, index: [ 'apm-*-transaction*', 'traces-apm*', @@ -2382,7 +2382,7 @@ export const expectedDsl = { 'packetbeat-*', 'winlogbeat-*', ], - ignoreUnavailable: true, + ignore_unavailable: true, body: { docvalue_fields: mockOptions.docValueFields, aggregations: { diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/authentications/dsl/query.dsl.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/authentications/dsl/query.dsl.ts index 325d45e04b2b0..1057ace837b43 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/authentications/dsl/query.dsl.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/authentications/dsl/query.dsl.ts @@ -61,9 +61,9 @@ export const buildQuery = ({ }; const dslQuery = { - allowNoIndices: true, + allow_no_indices: true, index: defaultIndex, - ignoreUnavailable: true, + ignore_unavailable: true, body: { ...(!isEmpty(docValueFields) ? { docvalue_fields: docValueFields } : {}), aggregations: { diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/authentications/dsl/query_entities.dsl.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/authentications/dsl/query_entities.dsl.ts index d320130115588..a17bb2ecf9c8f 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/authentications/dsl/query_entities.dsl.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/authentications/dsl/query_entities.dsl.ts @@ -41,9 +41,9 @@ export const buildQueryEntities = ({ }; const dslQuery = { - allowNoIndices: true, + allow_no_indices: true, index: defaultIndex, - ignoreUnavailable: true, + ignore_unavailable: true, body: { ...(!isEmpty(docValueFields) ? { docvalue_fields: docValueFields } : {}), aggregations: { diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/details/__mocks__/index.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/details/__mocks__/index.ts index e0473c9501b0c..ec8c7d7ca6866 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/details/__mocks__/index.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/details/__mocks__/index.ts @@ -1301,7 +1301,7 @@ export const formattedSearchStrategyResponse = { dsl: [ JSON.stringify( { - allowNoIndices: true, + allow_no_indices: true, index: [ 'apm-*-transaction*', 'traces-apm*', @@ -1312,7 +1312,7 @@ export const formattedSearchStrategyResponse = { 'packetbeat-*', 'winlogbeat-*', ], - ignoreUnavailable: true, + ignore_unavailable: true, track_total_hits: false, body: { aggregations: { @@ -1415,7 +1415,7 @@ export const formattedSearchStrategyResponse = { }; export const expectedDsl = { - allowNoIndices: true, + allow_no_indices: true, index: [ 'apm-*-transaction*', 'traces-apm*', @@ -1426,7 +1426,7 @@ export const expectedDsl = { 'packetbeat-*', 'winlogbeat-*', ], - ignoreUnavailable: true, + ignore_unavailable: true, track_total_hits: false, body: { aggregations: { diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/details/query.host_details.dsl.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/details/query.host_details.dsl.ts index 45afed2526aa3..003149a9501bb 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/details/query.host_details.dsl.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/details/query.host_details.dsl.ts @@ -35,9 +35,9 @@ export const buildHostDetailsQuery = ({ ]; const dslQuery = { - allowNoIndices: true, + allow_no_indices: true, index: defaultIndex, - ignoreUnavailable: true, + ignore_unavailable: true, track_total_hits: false, body: { aggregations: { diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/kpi/authentications/query.hosts_kpi_authentications.dsl.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/kpi/authentications/query.hosts_kpi_authentications.dsl.ts index 01473a4368dbc..738a9db683728 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/kpi/authentications/query.hosts_kpi_authentications.dsl.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/kpi/authentications/query.hosts_kpi_authentications.dsl.ts @@ -39,8 +39,8 @@ export const buildHostsKpiAuthenticationsQuery = ({ const dslQuery = { index: defaultIndex, - allowNoIndices: true, - ignoreUnavailable: true, + allow_no_indices: true, + ignore_unavailable: true, track_total_hits: false, body: { aggs: { diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/kpi/authentications/query.hosts_kpi_authentications_entities.dsl.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/kpi/authentications/query.hosts_kpi_authentications_entities.dsl.ts index cff09f2354d31..fd1104345babc 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/kpi/authentications/query.hosts_kpi_authentications_entities.dsl.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/kpi/authentications/query.hosts_kpi_authentications_entities.dsl.ts @@ -28,8 +28,8 @@ export const buildHostsKpiAuthenticationsQueryEntities = ({ const dslQuery = { index: defaultIndex, - allowNoIndices: true, - ignoreUnavailable: true, + allow_no_indices: true, + ignore_unavailable: true, track_total_hits: false, body: { aggs: { diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/kpi/hosts/query.hosts_kpi_hosts.dsl.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/kpi/hosts/query.hosts_kpi_hosts.dsl.ts index 5ea2d1aa40780..ed1d0e8edb107 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/kpi/hosts/query.hosts_kpi_hosts.dsl.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/kpi/hosts/query.hosts_kpi_hosts.dsl.ts @@ -28,8 +28,8 @@ export const buildHostsKpiHostsQuery = ({ const dslQuery = { index: defaultIndex, - allowNoIndices: true, - ignoreUnavailable: true, + allow_no_indices: true, + ignore_unavailable: true, track_total_hits: false, body: { aggregations: { diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/kpi/hosts/query.hosts_kpi_hosts_entities.dsl.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/kpi/hosts/query.hosts_kpi_hosts_entities.dsl.ts index 972ead9a6538e..785f6aa5b6980 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/kpi/hosts/query.hosts_kpi_hosts_entities.dsl.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/kpi/hosts/query.hosts_kpi_hosts_entities.dsl.ts @@ -28,8 +28,8 @@ export const buildHostsKpiHostsQueryEntities = ({ const dslQuery = { index: defaultIndex, - allowNoIndices: true, - ignoreUnavailable: true, + allow_no_indices: true, + ignore_unavailable: true, track_total_hits: false, body: { aggregations: { diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/kpi/unique_ips/query.hosts_kpi_unique_ips.dsl.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/kpi/unique_ips/query.hosts_kpi_unique_ips.dsl.ts index 0471644d11bbe..c875e23b523e5 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/kpi/unique_ips/query.hosts_kpi_unique_ips.dsl.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/kpi/unique_ips/query.hosts_kpi_unique_ips.dsl.ts @@ -28,8 +28,8 @@ export const buildHostsKpiUniqueIpsQuery = ({ const dslQuery = { index: defaultIndex, - allowNoIndices: true, - ignoreUnavailable: true, + allow_no_indices: true, + ignore_unavailable: true, track_total_hits: false, body: { aggregations: { diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/kpi/unique_ips/query.hosts_kpi_unique_ips_entities.dsl.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/kpi/unique_ips/query.hosts_kpi_unique_ips_entities.dsl.ts index 2a55c34238d70..e323de78a0459 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/kpi/unique_ips/query.hosts_kpi_unique_ips_entities.dsl.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/kpi/unique_ips/query.hosts_kpi_unique_ips_entities.dsl.ts @@ -28,8 +28,8 @@ export const buildHostsKpiUniqueIpsQueryEntities = ({ const dslQuery = { index: defaultIndex, - allowNoIndices: true, - ignoreUnavailable: true, + allow_no_indices: true, + ignore_unavailable: true, track_total_hits: false, body: { aggregations: { diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/last_first_seen/__mocks__/index.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/last_first_seen/__mocks__/index.ts index 443e7e96a3c7f..54403f9c392e7 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/last_first_seen/__mocks__/index.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/last_first_seen/__mocks__/index.ts @@ -124,7 +124,7 @@ export const formattedSearchStrategyFirstResponse = { dsl: [ JSON.stringify( { - allowNoIndices: true, + allow_no_indices: true, index: [ 'apm-*-transaction*', 'traces-apm*', @@ -135,7 +135,7 @@ export const formattedSearchStrategyFirstResponse = { 'packetbeat-*', 'winlogbeat-*', ], - ignoreUnavailable: true, + ignore_unavailable: true, track_total_hits: false, body: { query: { bool: { filter: [{ term: { 'host.name': 'siem-kibana' } }] } }, @@ -190,7 +190,7 @@ export const formattedSearchStrategyLastResponse = { dsl: [ JSON.stringify( { - allowNoIndices: true, + allow_no_indices: true, index: [ 'apm-*-transaction*', 'traces-apm*', @@ -201,7 +201,7 @@ export const formattedSearchStrategyLastResponse = { 'packetbeat-*', 'winlogbeat-*', ], - ignoreUnavailable: true, + ignore_unavailable: true, track_total_hits: false, body: { query: { bool: { filter: [{ term: { 'host.name': 'siem-kibana' } }] } }, @@ -225,7 +225,7 @@ export const formattedSearchStrategyLastResponse = { }; export const expectedDsl = { - allowNoIndices: true, + allow_no_indices: true, index: [ 'apm-*-transaction*', 'traces-apm*', @@ -236,7 +236,7 @@ export const expectedDsl = { 'packetbeat-*', 'winlogbeat-*', ], - ignoreUnavailable: true, + ignore_unavailable: true, track_total_hits: false, body: { _source: ['@timestamp'], diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/last_first_seen/query.first_or_last_seen_host.dsl.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/last_first_seen/query.first_or_last_seen_host.dsl.ts index 21876b9aad11b..8f9f7462b9dcb 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/last_first_seen/query.first_or_last_seen_host.dsl.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/last_first_seen/query.first_or_last_seen_host.dsl.ts @@ -17,9 +17,9 @@ export const buildFirstOrLastSeenHostQuery = ({ const filter = [{ term: { 'host.name': hostName } }]; const dslQuery = { - allowNoIndices: true, + allow_no_indices: true, index: defaultIndex, - ignoreUnavailable: true, + ignore_unavailable: true, track_total_hits: false, body: { ...(!isEmpty(docValueFields) ? { docvalue_fields: docValueFields } : {}), diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/overview/__mocks__/index.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/overview/__mocks__/index.ts index 2b4e4b8291401..85bce797f52ae 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/overview/__mocks__/index.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/overview/__mocks__/index.ts @@ -117,7 +117,7 @@ export const formattedSearchStrategyResponse = { dsl: [ JSON.stringify( { - allowNoIndices: true, + allow_no_indices: true, index: [ 'apm-*-transaction*', 'traces-apm*', @@ -128,7 +128,7 @@ export const formattedSearchStrategyResponse = { 'packetbeat-*', 'winlogbeat-*', ], - ignoreUnavailable: true, + ignore_unavailable: true, track_total_hits: false, body: { aggregations: { @@ -330,7 +330,7 @@ export const formattedSearchStrategyResponse = { }; export const expectedDsl = { - allowNoIndices: true, + allow_no_indices: true, index: [ 'apm-*-transaction*', 'traces-apm*', @@ -341,7 +341,7 @@ export const expectedDsl = { 'packetbeat-*', 'winlogbeat-*', ], - ignoreUnavailable: true, + ignore_unavailable: true, track_total_hits: false, body: { aggregations: { diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/overview/query.overview_host.dsl.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/overview/query.overview_host.dsl.ts index a0ae368ac0fe2..92d194e78284b 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/overview/query.overview_host.dsl.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/overview/query.overview_host.dsl.ts @@ -28,9 +28,9 @@ export const buildOverviewHostQuery = ({ ]; const dslQuery = { - allowNoIndices: true, + allow_no_indices: true, index: defaultIndex, - ignoreUnavailable: true, + ignore_unavailable: true, track_total_hits: false, body: { aggregations: { diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/risk_score/query.hosts_risk.dsl.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/risk_score/query.hosts_risk.dsl.ts index 43930ab3de2ef..5bbc9b7726002 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/risk_score/query.hosts_risk.dsl.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/risk_score/query.hosts_risk.dsl.ts @@ -32,8 +32,8 @@ export const buildHostsRiskScoreQuery = ({ const dslQuery = { index: defaultIndex, - allowNoIndices: false, - ignoreUnavailable: true, + allow_no_indices: false, + ignore_unavailable: true, track_total_hits: false, body: { query: { diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/uncommon_processes/__mocks__/index.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/uncommon_processes/__mocks__/index.ts index 0ad976a0f498c..2730465323c19 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/uncommon_processes/__mocks__/index.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/uncommon_processes/__mocks__/index.ts @@ -4300,7 +4300,7 @@ export const formattedSearchStrategyResponse = { dsl: [ JSON.stringify( { - allowNoIndices: true, + allow_no_indices: true, index: [ 'apm-*-transaction*', 'traces-apm*', @@ -4311,7 +4311,7 @@ export const formattedSearchStrategyResponse = { 'packetbeat-*', 'winlogbeat-*', ], - ignoreUnavailable: true, + ignore_unavailable: true, body: { aggregations: { process_count: { cardinality: { field: 'process.name' } }, @@ -4435,7 +4435,7 @@ export const formattedSearchStrategyResponse = { }; export const expectedDsl = { - allowNoIndices: true, + allow_no_indices: true, index: [ 'apm-*-transaction*', 'traces-apm*', @@ -4446,7 +4446,7 @@ export const expectedDsl = { 'packetbeat-*', 'winlogbeat-*', ], - ignoreUnavailable: true, + ignore_unavailable: true, body: { aggregations: { process_count: { cardinality: { field: 'process.name' } }, diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/uncommon_processes/dsl/query.dsl.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/uncommon_processes/dsl/query.dsl.ts index 5d4f45c68160a..c5a78354ed866 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/uncommon_processes/dsl/query.dsl.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/hosts/uncommon_processes/dsl/query.dsl.ts @@ -48,9 +48,9 @@ export const buildQuery = ({ }; const dslQuery = { - allowNoIndices: true, + allow_no_indices: true, index: defaultIndex, - ignoreUnavailable: true, + ignore_unavailable: true, body: { aggregations: { ...agg, diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/__mocks__/index.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/__mocks__/index.ts index 7f36e3551e5be..d5478dad15d50 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/__mocks__/index.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/__mocks__/index.ts @@ -41,8 +41,8 @@ export const formattedAlertsSearchStrategyResponse: MatrixHistogramStrategyRespo 'packetbeat-*', 'winlogbeat-*', ], - allowNoIndices: true, - ignoreUnavailable: true, + allow_no_indices: true, + ignore_unavailable: true, track_total_hits: true, body: { aggregations: { @@ -127,7 +127,7 @@ export const formattedAlertsSearchStrategyResponse: MatrixHistogramStrategyRespo }; export const expectedDsl = { - allowNoIndices: true, + allow_no_indices: true, track_total_hits: false, body: { aggregations: { @@ -164,7 +164,7 @@ export const expectedDsl = { }, size: 0, }, - ignoreUnavailable: true, + ignore_unavailable: true, index: [ 'apm-*-transaction*', 'traces-apm*', @@ -209,8 +209,8 @@ export const formattedAnomaliesSearchStrategyResponse: MatrixHistogramStrategyRe 'packetbeat-*', 'winlogbeat-*', ], - allowNoIndices: true, - ignoreUnavailable: true, + allow_no_indices: true, + ignore_unavailable: true, track_total_hits: true, body: { aggs: { @@ -392,8 +392,8 @@ export const formattedAuthenticationsSearchStrategyResponse: MatrixHistogramStra 'packetbeat-*', 'winlogbeat-*', ], - allowNoIndices: true, - ignoreUnavailable: true, + allow_no_indices: true, + ignore_unavailable: true, track_total_hits: true, body: { aggregations: { @@ -959,8 +959,8 @@ export const formattedEventsSearchStrategyResponse: MatrixHistogramStrategyRespo 'packetbeat-*', 'winlogbeat-*', ], - allowNoIndices: true, - ignoreUnavailable: true, + allow_no_indices: true, + ignore_unavailable: true, track_total_hits: true, body: { aggregations: { @@ -1927,7 +1927,7 @@ export const formattedDnsSearchStrategyResponse: MatrixHistogramStrategyResponse dsl: [ JSON.stringify( { - allowNoIndices: true, + allow_no_indices: true, index: [ 'apm-*-transaction*', 'traces-apm*', @@ -1938,7 +1938,7 @@ export const formattedDnsSearchStrategyResponse: MatrixHistogramStrategyResponse 'packetbeat-*', 'winlogbeat-*', ], - ignoreUnavailable: true, + ignore_unavailable: true, body: { aggregations: { dns_count: { cardinality: { field: 'dns.question.registered_domain' } }, diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/alerts/__mocks__/index.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/alerts/__mocks__/index.ts index 82531f35b09ab..4f6b910fbccf7 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/alerts/__mocks__/index.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/alerts/__mocks__/index.ts @@ -36,8 +36,8 @@ export const expectedDsl = { 'packetbeat-*', 'winlogbeat-*', ], - allowNoIndices: true, - ignoreUnavailable: true, + allow_no_indices: true, + ignore_unavailable: true, track_total_hits: true, body: { aggregations: { diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/alerts/query.alerts_histogram.dsl.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/alerts/query.alerts_histogram.dsl.ts index 54ee066b64119..60df6023a13d0 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/alerts/query.alerts_histogram.dsl.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/alerts/query.alerts_histogram.dsl.ts @@ -83,8 +83,8 @@ export const buildAlertsHistogramQuery = ({ const dslQuery = { index: defaultIndex, - allowNoIndices: true, - ignoreUnavailable: true, + allow_no_indices: true, + ignore_unavailable: true, track_total_hits: true, body: { aggregations: getHistogramAggregation(), diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/anomalies/__mocks__/index.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/anomalies/__mocks__/index.ts index ab76d54dee11f..700580655f1b0 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/anomalies/__mocks__/index.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/anomalies/__mocks__/index.ts @@ -36,8 +36,8 @@ export const expectedDsl = { 'packetbeat-*', 'winlogbeat-*', ], - allowNoIndices: true, - ignoreUnavailable: true, + allow_no_indices: true, + ignore_unavailable: true, track_total_hits: true, body: { aggs: { diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/anomalies/query.anomalies_histogram.dsl.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/anomalies/query.anomalies_histogram.dsl.ts index 78fc0a30d0477..b82e7823fd847 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/anomalies/query.anomalies_histogram.dsl.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/anomalies/query.anomalies_histogram.dsl.ts @@ -64,8 +64,8 @@ export const buildAnomaliesHistogramQuery = ({ const dslQuery = { index: defaultIndex, - allowNoIndices: true, - ignoreUnavailable: true, + allow_no_indices: true, + ignore_unavailable: true, track_total_hits: true, body: { aggs: getHistogramAggregation(), diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/authentications/__mocks__/index.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/authentications/__mocks__/index.ts index 1fd7b85242df6..b917da12c9ad7 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/authentications/__mocks__/index.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/authentications/__mocks__/index.ts @@ -35,8 +35,8 @@ export const expectedDsl = { 'packetbeat-*', 'winlogbeat-*', ], - allowNoIndices: true, - ignoreUnavailable: true, + allow_no_indices: true, + ignore_unavailable: true, track_total_hits: true, body: { aggregations: { diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/authentications/query.authentications_histogram.dsl.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/authentications/query.authentications_histogram.dsl.ts index 8661fff574b4a..b16efcd8301e0 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/authentications/query.authentications_histogram.dsl.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/authentications/query.authentications_histogram.dsl.ts @@ -76,8 +76,8 @@ export const buildAuthenticationsHistogramQuery = ({ const dslQuery = { index: defaultIndex, - allowNoIndices: true, - ignoreUnavailable: true, + allow_no_indices: true, + ignore_unavailable: true, track_total_hits: true, body: { aggregations: getHistogramAggregation(), diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/authentications/query.authentications_histogram_entities.dsl.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/authentications/query.authentications_histogram_entities.dsl.ts index c66a0d6c11b94..886dcf11123bd 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/authentications/query.authentications_histogram_entities.dsl.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/authentications/query.authentications_histogram_entities.dsl.ts @@ -59,8 +59,8 @@ export const buildAuthenticationsHistogramQueryEntities = ({ const dslQuery = { index: defaultIndex, - allowNoIndices: true, - ignoreUnavailable: true, + allow_no_indices: true, + ignore_unavailable: true, track_total_hits: true, body: { aggregations: getHistogramAggregation(), diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/dns/__mocks__/index.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/dns/__mocks__/index.ts index 4d97fba3cb80c..d4e721a5ebe80 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/dns/__mocks__/index.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/dns/__mocks__/index.ts @@ -26,7 +26,7 @@ export const mockOptions = { }; export const expectedDsl = { - allowNoIndices: true, + allow_no_indices: true, index: [ 'apm-*-transaction*', 'traces-apm*', @@ -37,7 +37,7 @@ export const expectedDsl = { 'packetbeat-*', 'winlogbeat-*', ], - ignoreUnavailable: true, + ignore_unavailable: true, body: { aggregations: { dns_count: { cardinality: { field: 'dns.question.registered_domain' } }, diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/dns/query.dns_histogram.dsl.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/dns/query.dns_histogram.dsl.ts index d9dfc57a264a8..7a7b4b49d17c1 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/dns/query.dns_histogram.dsl.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/dns/query.dns_histogram.dsl.ts @@ -77,9 +77,9 @@ export const buildDnsHistogramQuery = ({ ]; const dslQuery = { - allowNoIndices: true, + allow_no_indices: true, index: defaultIndex, - ignoreUnavailable: true, + ignore_unavailable: true, body: { ...(!isEmpty(docValueFields) ? { docvalue_fields: docValueFields } : {}), aggregations: { diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/events/__mocks__/index.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/events/__mocks__/index.ts index 5dab2bcd5cf9d..d2ee38ddd66a8 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/events/__mocks__/index.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/events/__mocks__/index.ts @@ -40,8 +40,8 @@ export const expectedDsl = { 'packetbeat-*', 'winlogbeat-*', ], - allowNoIndices: true, - ignoreUnavailable: true, + allow_no_indices: true, + ignore_unavailable: true, track_total_hits: true, body: { aggregations: { @@ -95,8 +95,8 @@ export const expectedThresholdDsl = { 'packetbeat-*', 'winlogbeat-*', ], - allowNoIndices: true, - ignoreUnavailable: true, + allow_no_indices: true, + ignore_unavailable: true, track_total_hits: true, body: { aggregations: { @@ -152,8 +152,8 @@ export const expectedThresholdMissingFieldDsl = { 'packetbeat-*', 'winlogbeat-*', ], - allowNoIndices: true, - ignoreUnavailable: true, + allow_no_indices: true, + ignore_unavailable: true, track_total_hits: true, body: { aggregations: { @@ -197,7 +197,7 @@ export const expectedThresholdMissingFieldDsl = { }; export const expectedThresholdWithCardinalityDsl = { - allowNoIndices: true, + allow_no_indices: true, body: { aggregations: { eventActionGroup: { @@ -244,7 +244,7 @@ export const expectedThresholdWithCardinalityDsl = { }, size: 0, }, - ignoreUnavailable: true, + ignore_unavailable: true, index: [ 'apm-*-transaction*', 'traces-apm*', @@ -269,8 +269,8 @@ export const expectedThresholdWithGroupFieldsAndCardinalityDsl = { 'packetbeat-*', 'winlogbeat-*', ], - allowNoIndices: true, - ignoreUnavailable: true, + allow_no_indices: true, + ignore_unavailable: true, track_total_hits: true, body: { aggregations: { @@ -316,7 +316,7 @@ export const expectedThresholdWithGroupFieldsAndCardinalityDsl = { }; export const expectedThresholdGroupWithCardinalityDsl = { - allowNoIndices: true, + allow_no_indices: true, body: { aggregations: { eventActionGroup: { @@ -365,7 +365,7 @@ export const expectedThresholdGroupWithCardinalityDsl = { }, size: 0, }, - ignoreUnavailable: true, + ignore_unavailable: true, index: [ 'apm-*-transaction*', 'traces-apm*', @@ -390,8 +390,8 @@ export const expectedIpIncludingMissingDataDsl = { 'packetbeat-*', 'winlogbeat-*', ], - allowNoIndices: true, - ignoreUnavailable: true, + allow_no_indices: true, + ignore_unavailable: true, track_total_hits: true, body: { aggregations: { @@ -453,8 +453,8 @@ export const expectedIpNotIncludingMissingDataDsl = { 'packetbeat-*', 'winlogbeat-*', ], - allowNoIndices: true, - ignoreUnavailable: true, + allow_no_indices: true, + ignore_unavailable: true, track_total_hits: true, body: { aggregations: { diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/events/query.events_histogram.dsl.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/events/query.events_histogram.dsl.ts index 16bcb3cdbfcb1..91aeb50448d4e 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/events/query.events_histogram.dsl.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/matrix_histogram/events/query.events_histogram.dsl.ts @@ -152,8 +152,8 @@ export const buildEventsHistogramQuery = ({ const dslQuery = { index: defaultIndex, - allowNoIndices: true, - ignoreUnavailable: true, + allow_no_indices: true, + ignore_unavailable: true, track_total_hits: true, body: { aggregations: getHistogramAggregation(), diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/details/__mocks__/index.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/details/__mocks__/index.ts index 7f71906bcaa97..158b63e6e8455 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/details/__mocks__/index.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/details/__mocks__/index.ts @@ -304,7 +304,7 @@ export const formattedSearchStrategyResponse = { dsl: [ JSON.stringify( { - allowNoIndices: true, + allow_no_indices: true, index: [ 'apm-*-transaction*', 'traces-apm*', @@ -315,7 +315,7 @@ export const formattedSearchStrategyResponse = { 'packetbeat-*', 'winlogbeat-*', ], - ignoreUnavailable: true, + ignore_unavailable: true, track_total_hits: false, body: { docvalue_fields: mockOptions.docValueFields, @@ -446,7 +446,7 @@ export const formattedSearchStrategyResponse = { }; export const expectedDsl = { - allowNoIndices: true, + allow_no_indices: true, index: [ 'apm-*-transaction*', 'traces-apm*', @@ -457,7 +457,7 @@ export const expectedDsl = { 'packetbeat-*', 'winlogbeat-*', ], - ignoreUnavailable: true, + ignore_unavailable: true, track_total_hits: false, body: { aggs: { diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/details/query.details_network.dsl.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/details/query.details_network.dsl.ts index e5a508663a2e0..5684c7685231e 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/details/query.details_network.dsl.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/details/query.details_network.dsl.ts @@ -103,9 +103,9 @@ export const buildNetworkDetailsQuery = ({ ip, }: NetworkDetailsRequestOptions) => { const dslQuery = { - allowNoIndices: true, + allow_no_indices: true, index: defaultIndex, - ignoreUnavailable: true, + ignore_unavailable: true, track_total_hits: false, body: { ...(!isEmpty(docValueFields) ? { docvalue_fields: docValueFields } : {}), diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/dns/__mocks__/index.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/dns/__mocks__/index.ts index cc01450e5bec5..f1bae35f53ebb 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/dns/__mocks__/index.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/dns/__mocks__/index.ts @@ -131,7 +131,7 @@ export const formattedSearchStrategyResponse = { dsl: [ JSON.stringify( { - allowNoIndices: true, + allow_no_indices: true, index: [ 'apm-*-transaction*', 'traces-apm*', @@ -142,7 +142,7 @@ export const formattedSearchStrategyResponse = { 'packetbeat-*', 'winlogbeat-*', ], - ignoreUnavailable: true, + ignore_unavailable: true, body: { aggregations: { dns_count: { cardinality: { field: 'dns.question.registered_domain' } }, @@ -203,7 +203,7 @@ export const formattedSearchStrategyResponse = { }; export const expectedDsl = { - allowNoIndices: true, + allow_no_indices: true, index: [ 'apm-*-transaction*', 'traces-apm*', @@ -214,7 +214,7 @@ export const expectedDsl = { 'packetbeat-*', 'winlogbeat-*', ], - ignoreUnavailable: true, + ignore_unavailable: true, body: { aggregations: { dns_count: { cardinality: { field: 'dns.question.registered_domain' } }, diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/dns/query.dns_network.dsl.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/dns/query.dns_network.dsl.ts index 90e8ee02ee684..612d83e81660d 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/dns/query.dns_network.dsl.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/dns/query.dns_network.dsl.ts @@ -88,9 +88,9 @@ export const buildDnsQuery = ({ ]; const dslQuery = { - allowNoIndices: true, + allow_no_indices: true, index: defaultIndex, - ignoreUnavailable: true, + ignore_unavailable: true, body: { ...(!isEmpty(docValueFields) ? { docvalue_fields: docValueFields } : {}), aggregations: { diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/http/__mocks__/index.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/http/__mocks__/index.ts index 9d52eb638eac6..f831b9f20e8ca 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/http/__mocks__/index.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/http/__mocks__/index.ts @@ -613,7 +613,7 @@ export const formattedSearchStrategyResponse = { dsl: [ JSON.stringify( { - allowNoIndices: true, + allow_no_indices: true, index: [ 'apm-*-transaction*', 'traces-apm*', @@ -624,7 +624,7 @@ export const formattedSearchStrategyResponse = { 'packetbeat-*', 'winlogbeat-*', ], - ignoreUnavailable: true, + ignore_unavailable: true, body: { aggregations: { http_count: { cardinality: { field: 'url.path' } }, @@ -671,7 +671,7 @@ export const formattedSearchStrategyResponse = { }; export const expectedDsl = { - allowNoIndices: true, + allow_no_indices: true, index: [ 'apm-*-transaction*', 'traces-apm*', @@ -682,7 +682,7 @@ export const expectedDsl = { 'packetbeat-*', 'winlogbeat-*', ], - ignoreUnavailable: true, + ignore_unavailable: true, body: { aggregations: { http_count: { cardinality: { field: 'url.path' } }, diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/http/query.http_network.dsl.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/http/query.http_network.dsl.ts index 85db56cd72167..8882d17804261 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/http/query.http_network.dsl.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/http/query.http_network.dsl.ts @@ -36,9 +36,9 @@ export const buildHttpQuery = ({ ]; const dslQuery = { - allowNoIndices: true, + allow_no_indices: true, index: defaultIndex, - ignoreUnavailable: true, + ignore_unavailable: true, body: { aggregations: { ...getCountAgg(), diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/kpi/dns/query.network_kip_dns_entities.dsl.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/kpi/dns/query.network_kip_dns_entities.dsl.ts index 75b32af4b01f5..c0317772e5fa9 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/kpi/dns/query.network_kip_dns_entities.dsl.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/kpi/dns/query.network_kip_dns_entities.dsl.ts @@ -28,8 +28,8 @@ export const buildDnsQueryEntities = ({ const dslQuery = { index: defaultIndex, - allowNoIndices: true, - ignoreUnavailable: true, + allow_no_indices: true, + ignore_unavailable: true, track_total_hits: false, body: { aggs: { diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/kpi/dns/query.network_kpi_dns.dsl.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/kpi/dns/query.network_kpi_dns.dsl.ts index 1d1aa50cc3ee2..8d27f7d289d03 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/kpi/dns/query.network_kpi_dns.dsl.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/kpi/dns/query.network_kpi_dns.dsl.ts @@ -56,8 +56,8 @@ export const buildDnsQuery = ({ const dslQuery = { index: defaultIndex, - allowNoIndices: true, - ignoreUnavailable: true, + allow_no_indices: true, + ignore_unavailable: true, track_total_hits: true, body: { query: { diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/kpi/network_events/query.network_kpi_network_events.dsl.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/kpi/network_events/query.network_kpi_network_events.dsl.ts index 3d5607c8b443a..4d5ca88fe383a 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/kpi/network_events/query.network_kpi_network_events.dsl.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/kpi/network_events/query.network_kpi_network_events.dsl.ts @@ -30,8 +30,8 @@ export const buildNetworkEventsQuery = ({ const dslQuery = { index: defaultIndex, - allowNoIndices: true, - ignoreUnavailable: true, + allow_no_indices: true, + ignore_unavailable: true, track_total_hits: true, body: { query: { diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/kpi/network_events/query.network_kpi_network_events_entities.dsl.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/kpi/network_events/query.network_kpi_network_events_entities.dsl.ts index 6311bb6ea2039..bb40da0a064fb 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/kpi/network_events/query.network_kpi_network_events_entities.dsl.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/kpi/network_events/query.network_kpi_network_events_entities.dsl.ts @@ -28,8 +28,8 @@ export const buildNetworkEventsQueryEntities = ({ const dslQuery = { index: defaultIndex, - allowNoIndices: true, - ignoreUnavailable: true, + allow_no_indices: true, + ignore_unavailable: true, track_total_hits: false, body: { aggs: { diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/kpi/tls_handshakes/query.network_kpi_tls_handshakes.dsl.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/kpi/tls_handshakes/query.network_kpi_tls_handshakes.dsl.ts index 0a826938e95b8..eae7f7a29ce72 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/kpi/tls_handshakes/query.network_kpi_tls_handshakes.dsl.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/kpi/tls_handshakes/query.network_kpi_tls_handshakes.dsl.ts @@ -56,8 +56,8 @@ export const buildTlsHandshakeQuery = ({ const dslQuery = { index: defaultIndex, - allowNoIndices: true, - ignoreUnavailable: true, + allow_no_indices: true, + ignore_unavailable: true, track_total_hits: true, body: { query: { diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/kpi/tls_handshakes/query.network_kpi_tls_handshakes_entities.dsl.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/kpi/tls_handshakes/query.network_kpi_tls_handshakes_entities.dsl.ts index 5b0ac92b35049..bd7a464e1a090 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/kpi/tls_handshakes/query.network_kpi_tls_handshakes_entities.dsl.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/kpi/tls_handshakes/query.network_kpi_tls_handshakes_entities.dsl.ts @@ -28,8 +28,8 @@ export const buildTlsHandshakeQueryEntities = ({ const dslQuery = { index: defaultIndex, - allowNoIndices: true, - ignoreUnavailable: true, + allow_no_indices: true, + ignore_unavailable: true, track_total_hits: false, body: { aggs: { diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/kpi/unique_flows/query.network_kpi_unique_flows.dsl.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/kpi/unique_flows/query.network_kpi_unique_flows.dsl.ts index ec8de30cfff85..3cb04caf5afe5 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/kpi/unique_flows/query.network_kpi_unique_flows.dsl.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/kpi/unique_flows/query.network_kpi_unique_flows.dsl.ts @@ -30,8 +30,8 @@ export const buildUniqueFlowsQuery = ({ const dslQuery = { index: defaultIndex, - allowNoIndices: true, - ignoreUnavailable: true, + allow_no_indices: true, + ignore_unavailable: true, track_total_hits: false, body: { aggregations: { diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/kpi/unique_private_ips/query.network_kpi_unique_private_ips.dsl.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/kpi/unique_private_ips/query.network_kpi_unique_private_ips.dsl.ts index 590e7117826d7..c915cd4fb58d6 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/kpi/unique_private_ips/query.network_kpi_unique_private_ips.dsl.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/kpi/unique_private_ips/query.network_kpi_unique_private_ips.dsl.ts @@ -84,9 +84,9 @@ export const buildUniquePrivateIpsQuery = ({ ]; const dslQuery = { - allowNoIndices: true, + allow_no_indices: true, index: defaultIndex, - ignoreUnavailable: true, + ignore_unavailable: true, track_total_hits: false, body: { aggregations: { diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/kpi/unique_private_ips/query.network_kpi_unique_private_ips_entities.dsl.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/kpi/unique_private_ips/query.network_kpi_unique_private_ips_entities.dsl.ts index a56cf4c3d1ced..922a082439807 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/kpi/unique_private_ips/query.network_kpi_unique_private_ips_entities.dsl.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/kpi/unique_private_ips/query.network_kpi_unique_private_ips_entities.dsl.ts @@ -84,9 +84,9 @@ export const buildUniquePrivateIpsQueryEntities = ({ ]; const dslQuery = { - allowNoIndices: true, + allow_no_indices: true, index: defaultIndex, - ignoreUnavailable: true, + ignore_unavailable: true, track_total_hits: false, body: { aggregations: { diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/overview/__mocks__/index.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/overview/__mocks__/index.ts index 74b201e9a2294..0b5019d6fec9a 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/overview/__mocks__/index.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/overview/__mocks__/index.ts @@ -101,7 +101,7 @@ export const formattedSearchStrategyResponse = { dsl: [ JSON.stringify( { - allowNoIndices: true, + allow_no_indices: true, index: [ 'apm-*-transaction*', 'traces-apm*', @@ -112,7 +112,7 @@ export const formattedSearchStrategyResponse = { 'packetbeat-*', 'winlogbeat-*', ], - ignoreUnavailable: true, + ignore_unavailable: true, track_total_hits: false, body: { aggregations: { @@ -206,8 +206,8 @@ export const formattedSearchStrategyResponse = { }; export const expectedDsl = { - allowNoIndices: true, - ignoreUnavailable: true, + allow_no_indices: true, + ignore_unavailable: true, index: [ 'apm-*-transaction*', 'traces-apm*', diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/overview/query.overview_network.dsl.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/overview/query.overview_network.dsl.ts index 7e35ae2fd4308..f911850c8cd94 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/overview/query.overview_network.dsl.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/overview/query.overview_network.dsl.ts @@ -28,9 +28,9 @@ export const buildOverviewNetworkQuery = ({ ]; const dslQuery = { - allowNoIndices: true, + allow_no_indices: true, index: defaultIndex, - ignoreUnavailable: true, + ignore_unavailable: true, track_total_hits: false, body: { aggregations: { diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/tls/__mocks__/index.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/tls/__mocks__/index.ts index e46c2c20aa1a8..c34ec2225ed95 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/tls/__mocks__/index.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/tls/__mocks__/index.ts @@ -59,7 +59,7 @@ export const formattedSearchStrategyResponse = { dsl: [ JSON.stringify( { - allowNoIndices: true, + allow_no_indices: true, index: [ 'apm-*-transaction*', 'traces-apm*', @@ -70,7 +70,7 @@ export const formattedSearchStrategyResponse = { 'packetbeat-*', 'winlogbeat-*', ], - ignoreUnavailable: true, + ignore_unavailable: true, track_total_hits: false, body: { aggs: { @@ -114,7 +114,7 @@ export const formattedSearchStrategyResponse = { }; export const expectedDsl = { - allowNoIndices: true, + allow_no_indices: true, index: [ 'apm-*-transaction*', 'traces-apm*', @@ -125,7 +125,7 @@ export const expectedDsl = { 'packetbeat-*', 'winlogbeat-*', ], - ignoreUnavailable: true, + ignore_unavailable: true, track_total_hits: false, body: { aggs: { diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/tls/query.tls_network.dsl.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/tls/query.tls_network.dsl.ts index 4f724cf9b15f9..297643fe56952 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/tls/query.tls_network.dsl.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/tls/query.tls_network.dsl.ts @@ -75,9 +75,9 @@ export const buildNetworkTlsQuery = ({ const filter = ip ? [...defaultFilter, { term: { [`${flowTarget}.ip`]: ip } }] : defaultFilter; const dslQuery = { - allowNoIndices: true, + allow_no_indices: true, index: defaultIndex, - ignoreUnavailable: true, + ignore_unavailable: true, track_total_hits: false, body: { aggs: { diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/top_countries/__mocks__/index.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/top_countries/__mocks__/index.ts index ba5db90df8245..490ade26ad2a5 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/top_countries/__mocks__/index.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/top_countries/__mocks__/index.ts @@ -58,7 +58,7 @@ export const formattedSearchStrategyResponse = { dsl: [ JSON.stringify( { - allowNoIndices: true, + allow_no_indices: true, index: [ 'apm-*-transaction*', 'traces-apm*', @@ -69,7 +69,7 @@ export const formattedSearchStrategyResponse = { 'packetbeat-*', 'winlogbeat-*', ], - ignoreUnavailable: true, + ignore_unavailable: true, body: { aggregations: { top_countries_count: { cardinality: { field: 'destination.geo.country_iso_code' } }, @@ -118,7 +118,7 @@ export const formattedSearchStrategyResponse = { }; export const expectedDsl = { - allowNoIndices: true, + allow_no_indices: true, index: [ 'apm-*-transaction*', 'traces-apm*', @@ -129,7 +129,7 @@ export const expectedDsl = { 'packetbeat-*', 'winlogbeat-*', ], - ignoreUnavailable: true, + ignore_unavailable: true, body: { aggregations: { top_countries_count: { cardinality: { field: 'destination.geo.country_iso_code' } }, diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/top_countries/query.top_countries_network.dsl.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/top_countries/query.top_countries_network.dsl.ts index 880cd4002086a..463d3c9b11bd2 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/top_countries/query.top_countries_network.dsl.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/top_countries/query.top_countries_network.dsl.ts @@ -42,9 +42,9 @@ export const buildTopCountriesQuery = ({ ]; const dslQuery = { - allowNoIndices: true, + allow_no_indices: true, index: defaultIndex, - ignoreUnavailable: true, + ignore_unavailable: true, body: { aggregations: { ...getCountAgg(flowTarget), diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/top_countries/query.top_countries_network_entities.dsl.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/top_countries/query.top_countries_network_entities.dsl.ts index d661bfa0d6707..7f1d27db45d2d 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/top_countries/query.top_countries_network_entities.dsl.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/top_countries/query.top_countries_network_entities.dsl.ts @@ -47,9 +47,9 @@ export const buildTopCountriesQueryEntities = ({ ]; const dslQuery = { - allowNoIndices: true, + allow_no_indices: true, index: defaultIndex, - ignoreUnavailable: true, + ignore_unavailable: true, body: { aggregations: { ...getCountAgg(flowTarget), diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/top_n_flow/__mocks__/index.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/top_n_flow/__mocks__/index.ts index e881a9ef93949..fa759661772d5 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/top_n_flow/__mocks__/index.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/top_n_flow/__mocks__/index.ts @@ -810,7 +810,7 @@ export const formattedSearchStrategyResponse: NetworkTopNFlowStrategyResponse = dsl: [ JSON.stringify( { - allowNoIndices: true, + allow_no_indices: true, index: [ 'apm-*-transaction*', 'traces-apm*', @@ -821,7 +821,7 @@ export const formattedSearchStrategyResponse: NetworkTopNFlowStrategyResponse = 'packetbeat-*', 'winlogbeat-*', ], - ignoreUnavailable: true, + ignore_unavailable: true, body: { aggregations: { top_n_flow_count: { cardinality: { field: 'source.ip' } }, @@ -878,7 +878,7 @@ export const formattedSearchStrategyResponse: NetworkTopNFlowStrategyResponse = }; export const expectedDsl = { - allowNoIndices: true, + allow_no_indices: true, index: [ 'apm-*-transaction*', 'traces-apm*', @@ -889,7 +889,7 @@ export const expectedDsl = { 'packetbeat-*', 'winlogbeat-*', ], - ignoreUnavailable: true, + ignore_unavailable: true, body: { aggregations: { top_n_flow_count: { cardinality: { field: 'source.ip' } }, diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/top_n_flow/query.top_n_flow_network.dsl.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/top_n_flow/query.top_n_flow_network.dsl.ts index f1ac87e59d392..52efb50f00b4b 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/top_n_flow/query.top_n_flow_network.dsl.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/top_n_flow/query.top_n_flow_network.dsl.ts @@ -42,9 +42,9 @@ export const buildTopNFlowQuery = ({ ]; const dslQuery = { - allowNoIndices: true, + allow_no_indices: true, index: defaultIndex, - ignoreUnavailable: true, + ignore_unavailable: true, body: { aggregations: { ...getCountAgg(flowTarget), diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/top_n_flow/query.top_n_flow_network_entities.dsl.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/top_n_flow/query.top_n_flow_network_entities.dsl.ts index 3ea3c6f363de0..d11a2debf3cff 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/top_n_flow/query.top_n_flow_network_entities.dsl.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/top_n_flow/query.top_n_flow_network_entities.dsl.ts @@ -47,9 +47,9 @@ export const buildTopNFlowQueryEntities = ({ ]; const dslQuery = { - allowNoIndices: true, + allow_no_indices: true, index: defaultIndex, - ignoreUnavailable: true, + ignore_unavailable: true, body: { aggregations: { ...getCountAgg(flowTarget), diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/users/__mocks__/index.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/users/__mocks__/index.ts index 686730dbe7927..acb98b7e347bc 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/users/__mocks__/index.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/users/__mocks__/index.ts @@ -119,7 +119,7 @@ export const formattedSearchStrategyResponse = { dsl: [ JSON.stringify( { - allowNoIndices: true, + allow_no_indices: true, index: [ 'apm-*-transaction*', 'traces-apm*', @@ -130,7 +130,7 @@ export const formattedSearchStrategyResponse = { 'packetbeat-*', 'winlogbeat-*', ], - ignoreUnavailable: true, + ignore_unavailable: true, track_total_hits: false, body: { aggs: { @@ -175,7 +175,7 @@ export const formattedSearchStrategyResponse = { }; export const expectedDsl = { - allowNoIndices: true, + allow_no_indices: true, track_total_hits: false, body: { aggs: { @@ -209,7 +209,7 @@ export const expectedDsl = { }, size: 0, }, - ignoreUnavailable: true, + ignore_unavailable: true, index: [ 'apm-*-transaction*', 'traces-apm*', diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/users/query.users_network.dsl.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/users/query.users_network.dsl.ts index 2b02b25292a32..0c35c967c2ac5 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/users/query.users_network.dsl.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/network/users/query.users_network.dsl.ts @@ -34,9 +34,9 @@ export const buildUsersQuery = ({ ]; const dslQuery = { - allowNoIndices: true, + allow_no_indices: true, index: defaultIndex, - ignoreUnavailable: true, + ignore_unavailable: true, track_total_hits: false, body: { aggs: { diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/ueba/host_rules/query.host_rules.dsl.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/ueba/host_rules/query.host_rules.dsl.ts index 4c116104b3e14..d2aeb63b743f5 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/ueba/host_rules/query.host_rules.dsl.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/ueba/host_rules/query.host_rules.dsl.ts @@ -30,9 +30,9 @@ export const buildHostRulesQuery = ({ ]; return { - allowNoIndices: true, + allow_no_indices: true, index: defaultIndex, // can stop getting this from sourcerer and assume default detections index if we want - ignoreUnavailable: true, + ignore_unavailable: true, track_total_hits: true, body: { ...(!isEmpty(docValueFields) ? { docvalue_fields: docValueFields } : {}), diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/ueba/host_tactics/query.host_tactics.dsl.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/ueba/host_tactics/query.host_tactics.dsl.ts index ec1afe247011b..f9bbcc8077278 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/ueba/host_tactics/query.host_tactics.dsl.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/ueba/host_tactics/query.host_tactics.dsl.ts @@ -30,9 +30,9 @@ export const buildHostTacticsQuery = ({ ]; return { - allowNoIndices: true, + allow_no_indices: true, index: defaultIndex, // can stop getting this from sourcerer and assume default detections index if we want - ignoreUnavailable: true, + ignore_unavailable: true, track_total_hits: true, body: { ...(!isEmpty(docValueFields) ? { docvalue_fields: docValueFields } : {}), diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/ueba/risk_score/query.risk_score.dsl.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/ueba/risk_score/query.risk_score.dsl.ts index 79c50d84e3c92..90d2e51c8ff9e 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/ueba/risk_score/query.risk_score.dsl.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/ueba/risk_score/query.risk_score.dsl.ts @@ -31,9 +31,9 @@ export const buildRiskScoreQuery = ({ ]; return { - allowNoIndices: true, + allow_no_indices: true, index: defaultIndex, - ignoreUnavailable: true, + ignore_unavailable: true, track_total_hits: true, body: { ...(!isEmpty(docValueFields) ? { docvalue_fields: docValueFields } : {}), diff --git a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/ueba/user_rules/query.user_rules.dsl.ts b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/ueba/user_rules/query.user_rules.dsl.ts index c2242ff00a6c1..d3111eed4aef8 100644 --- a/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/ueba/user_rules/query.user_rules.dsl.ts +++ b/x-pack/plugins/security_solution/server/search_strategy/security_solution/factory/ueba/user_rules/query.user_rules.dsl.ts @@ -30,9 +30,9 @@ export const buildUserRulesQuery = ({ ]; return { - allowNoIndices: true, + allow_no_indices: true, index: defaultIndex, // can stop getting this from sourcerer and assume default detections index if we want - ignoreUnavailable: true, + ignore_unavailable: true, track_total_hits: true, body: { ...(!isEmpty(docValueFields) ? { docvalue_fields: docValueFields } : {}), diff --git a/x-pack/plugins/security_solution/server/usage/detections/detection_rule_helpers.ts b/x-pack/plugins/security_solution/server/usage/detections/detection_rule_helpers.ts index 8d5a2efc7fae1..eaeceb8ab57ee 100644 --- a/x-pack/plugins/security_solution/server/usage/detections/detection_rule_helpers.ts +++ b/x-pack/plugins/security_solution/server/usage/detections/detection_rule_helpers.ts @@ -188,8 +188,8 @@ export const getDetectionRuleMetrics = async ( let rulesUsage: DetectionRulesTypeUsage = initialDetectionRulesUsage; const ruleSearchOptions: RuleSearchParams = { body: { query: { bool: { filter: { term: { 'alert.alertTypeId': SIGNALS_ID } } } } }, - filterPath: [], - ignoreUnavailable: true, + filter_path: [], + ignore_unavailable: true, index: kibanaIndex, size: MAX_RESULTS_WINDOW, }; diff --git a/x-pack/plugins/security_solution/server/usage/detections/types.ts b/x-pack/plugins/security_solution/server/usage/detections/types.ts index 0e3ba97ca0f7c..430a524f3f03a 100644 --- a/x-pack/plugins/security_solution/server/usage/detections/types.ts +++ b/x-pack/plugins/security_solution/server/usage/detections/types.ts @@ -17,8 +17,8 @@ interface RuleSearchBody { export interface RuleSearchParams { body: RuleSearchBody; - filterPath: string[]; - ignoreUnavailable: boolean; + filter_path: string[]; + ignore_unavailable: boolean; index: string; size: number; } diff --git a/x-pack/plugins/timelines/server/search_strategy/timeline/factory/events/all/query.events_all.dsl.ts b/x-pack/plugins/timelines/server/search_strategy/timeline/factory/events/all/query.events_all.dsl.ts index 72a7d6e2692e8..3653cb60d3653 100644 --- a/x-pack/plugins/timelines/server/search_strategy/timeline/factory/events/all/query.events_all.dsl.ts +++ b/x-pack/plugins/timelines/server/search_strategy/timeline/factory/events/all/query.events_all.dsl.ts @@ -63,9 +63,9 @@ export const buildTimelineEventsAllQuery = ({ }); const dslQuery = { - allowNoIndices: true, + allow_no_indices: true, index: defaultIndex, - ignoreUnavailable: true, + ignore_unavailable: true, body: { ...(!isEmpty(docValueFields) ? { docvalue_fields: docValueFields } : {}), aggregations: { diff --git a/x-pack/plugins/timelines/server/search_strategy/timeline/factory/events/details/query.events_details.dsl.test.ts b/x-pack/plugins/timelines/server/search_strategy/timeline/factory/events/details/query.events_details.dsl.test.ts index 3572a2b9c497e..9066861cdb818 100644 --- a/x-pack/plugins/timelines/server/search_strategy/timeline/factory/events/details/query.events_details.dsl.test.ts +++ b/x-pack/plugins/timelines/server/search_strategy/timeline/factory/events/details/query.events_details.dsl.test.ts @@ -22,7 +22,7 @@ describe('buildTimelineDetailsQuery', () => { expect(query).toMatchInlineSnapshot(` Object { - "allowNoIndices": true, + "allow_no_indices": true, "body": Object { "_source": true, "docvalue_fields": Array [ @@ -53,7 +53,7 @@ describe('buildTimelineDetailsQuery', () => { }, }, }, - "ignoreUnavailable": true, + "ignore_unavailable": true, "index": ".siem-signals-default", "size": 1, } diff --git a/x-pack/plugins/timelines/server/search_strategy/timeline/factory/events/details/query.events_details.dsl.ts b/x-pack/plugins/timelines/server/search_strategy/timeline/factory/events/details/query.events_details.dsl.ts index 4297cd595e261..70b592440468e 100644 --- a/x-pack/plugins/timelines/server/search_strategy/timeline/factory/events/details/query.events_details.dsl.ts +++ b/x-pack/plugins/timelines/server/search_strategy/timeline/factory/events/details/query.events_details.dsl.ts @@ -33,9 +33,9 @@ export const buildTimelineDetailsQuery = ( }; return { - allowNoIndices: true, + allow_no_indices: true, index: indexName, - ignoreUnavailable: true, + ignore_unavailable: true, body: { docvalue_fields: docValueFields, query, diff --git a/x-pack/plugins/timelines/server/search_strategy/timeline/factory/events/kpi/query.kpi.dsl.ts b/x-pack/plugins/timelines/server/search_strategy/timeline/factory/events/kpi/query.kpi.dsl.ts index 41eed7cbb4fa3..dd87ef177bfe6 100644 --- a/x-pack/plugins/timelines/server/search_strategy/timeline/factory/events/kpi/query.kpi.dsl.ts +++ b/x-pack/plugins/timelines/server/search_strategy/timeline/factory/events/kpi/query.kpi.dsl.ts @@ -44,9 +44,9 @@ export const buildTimelineKpiQuery = ({ const filter = [...filterClause, ...getTimerangeFilter(timerange), { match_all: {} }]; const dslQuery = { - allowNoIndices: true, + allow_no_indices: true, index: defaultIndex, - ignoreUnavailable: true, + ignore_unavailable: true, body: { aggs: { userCount: { diff --git a/x-pack/plugins/timelines/server/search_strategy/timeline/factory/events/last_event_time/query.events_last_event_time.dsl.ts b/x-pack/plugins/timelines/server/search_strategy/timeline/factory/events/last_event_time/query.events_last_event_time.dsl.ts index 354c682377bac..4ff86c9a9f290 100644 --- a/x-pack/plugins/timelines/server/search_strategy/timeline/factory/events/last_event_time/query.events_last_event_time.dsl.ts +++ b/x-pack/plugins/timelines/server/search_strategy/timeline/factory/events/last_event_time/query.events_last_event_time.dsl.ts @@ -38,9 +38,9 @@ export const buildLastEventTimeQuery = ({ case LastEventIndexKey.ipDetails: if (details.ip) { return { - allowNoIndices: true, + allow_no_indices: true, index: indicesToQuery.network, - ignoreUnavailable: true, + ignore_unavailable: true, track_total_hits: false, body: { ...(!isEmpty(docValueFields) ? { docvalue_fields: docValueFields } : {}), @@ -61,9 +61,9 @@ export const buildLastEventTimeQuery = ({ case LastEventIndexKey.hostDetails: if (details.hostName) { return { - allowNoIndices: true, + allow_no_indices: true, index: indicesToQuery.hosts, - ignoreUnavailable: true, + ignore_unavailable: true, track_total_hits: false, body: { ...(!isEmpty(docValueFields) ? { docvalue_fields: docValueFields } : {}), @@ -85,9 +85,9 @@ export const buildLastEventTimeQuery = ({ case LastEventIndexKey.network: case LastEventIndexKey.ueba: return { - allowNoIndices: true, + allow_no_indices: true, index: indicesToQuery[indexKey], - ignoreUnavailable: true, + ignore_unavailable: true, track_total_hits: false, body: { ...(!isEmpty(docValueFields) ? { docvalue_fields: docValueFields } : {}),