File tree Expand file tree Collapse file tree 5 files changed +33
-28
lines changed
legacy/plugins/maps/common
public/layers/sources/es_term_source Expand file tree Collapse file tree 5 files changed +33
-28
lines changed Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
3+ * or more contributor license agreements. Licensed under the Elastic License;
4+ * you may not use this file except in compliance with the Elastic License.
5+ */
6+
7+ // eslint-disable-next-line @kbn/eslint/no-restricted-paths
8+ export * from '../../../../plugins/maps/common/get_join_key' ;
Original file line number Diff line number Diff line change @@ -9,11 +9,11 @@ import {
99 AGG_DELIMITER ,
1010 AGG_TYPE ,
1111 FIELD_ORIGIN ,
12- getJoinAggKey ,
1312 JOIN_FIELD_NAME_PREFIX ,
1413 LAYER_TYPE ,
1514 VECTOR_STYLES ,
1615} from '../constants' ;
16+ import { getJoinAggKey } from '../get_join_key' ;
1717import {
1818 AggDescriptor ,
1919 JoinDescriptor ,
Original file line number Diff line number Diff line change 1- /*
2- * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
3- * or more contributor license agreements. Licensed under the Elastic License;
4- * you may not use this file except in compliance with the Elastic License.
5- */
6-
71/*
82 * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
93 * or more contributor license agreements. Licensed under the Elastic License;
@@ -75,21 +69,6 @@ export enum FIELD_ORIGIN {
7569}
7670export const JOIN_FIELD_NAME_PREFIX = '__kbnjoin__' ;
7771
78- // function in common since its needed by migration
79- export function getJoinAggKey ( {
80- aggType,
81- aggFieldName,
82- rightSourceId,
83- } : {
84- aggType : AGG_TYPE ;
85- aggFieldName ?: string ;
86- rightSourceId : string ;
87- } ) {
88- const metricKey =
89- aggType !== AGG_TYPE . COUNT ? `${ aggType } ${ AGG_DELIMITER } ${ aggFieldName } ` : aggType ;
90- return `${ JOIN_FIELD_NAME_PREFIX } ${ metricKey } __${ rightSourceId } ` ;
91- }
92-
9372export const SOURCE_DATA_ID_ORIGIN = 'source' ;
9473export const META_ID_ORIGIN_SUFFIX = 'meta' ;
9574export const SOURCE_META_ID_ORIGIN = `${ SOURCE_DATA_ID_ORIGIN } _${ META_ID_ORIGIN_SUFFIX } ` ;
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
3+ * or more contributor license agreements. Licensed under the Elastic License;
4+ * you may not use this file except in compliance with the Elastic License.
5+ */
6+
7+ import { AGG_DELIMITER , AGG_TYPE , JOIN_FIELD_NAME_PREFIX } from './constants' ;
8+
9+ // function in common since its needed by migration
10+ export function getJoinAggKey ( {
11+ aggType,
12+ aggFieldName,
13+ rightSourceId,
14+ } : {
15+ aggType : AGG_TYPE ;
16+ aggFieldName ?: string ;
17+ rightSourceId : string ;
18+ } ) {
19+ const metricKey =
20+ aggType !== AGG_TYPE . COUNT ? `${ aggType } ${ AGG_DELIMITER } ${ aggFieldName } ` : aggType ;
21+ return `${ JOIN_FIELD_NAME_PREFIX } ${ metricKey } __${ rightSourceId } ` ;
22+ }
Original file line number Diff line number Diff line change 77import _ from 'lodash' ;
88
99import { i18n } from '@kbn/i18n' ;
10- import {
11- AGG_TYPE ,
12- DEFAULT_MAX_BUCKETS_LIMIT ,
13- FIELD_ORIGIN ,
14- getJoinAggKey ,
15- } from '../../../../common/constants' ;
10+ import { AGG_TYPE , DEFAULT_MAX_BUCKETS_LIMIT , FIELD_ORIGIN } from '../../../../common/constants' ;
11+ import { getJoinAggKey } from '../../../../common/get_join_key' ;
1612import { ESDocField } from '../../fields/es_doc_field' ;
1713import { AbstractESAggSource } from '../es_agg_source' ;
1814import { getField , addFieldToDSL , extractPropertiesFromBucket } from '../../util/es_agg_utils' ;
You can’t perform that action at this time.
0 commit comments