diff --git a/docs/maps/vector-layer.asciidoc b/docs/maps/vector-layer.asciidoc index 2115c16a889c63..5017ecf91dffd6 100644 --- a/docs/maps/vector-layer.asciidoc +++ b/docs/maps/vector-layer.asciidoc @@ -20,10 +20,10 @@ The index must contain at least one field mapped as {ref}/geo-point.html[geo_poi Results are limited to the `index.max_result_window` index setting, which defaults to 10000. Select the appropriate *Scaling* option for your use case. + -* *Limit results to 10000.* The layer displays features from the first `index.max_result_window` documents. +* *Limit results to 10,000* The layer displays features from the first `index.max_result_window` documents. Results exceeding `index.max_result_window` are not displayed. -* *Show clusters when results exceed 10000.* When results exceed `index.max_result_window`, the layer uses {ref}/search-aggregations-bucket-geotilegrid-aggregation.html[GeoTile grid aggregation] to group your documents into clusters and displays metrics for each cluster. When results are less then `index.max_result_window`, the layer displays features from individual documents. +* *Show clusters when results exceed 10,000* When results exceed `index.max_result_window`, the layer uses {ref}/search-aggregations-bucket-geotilegrid-aggregation.html[GeoTile grid aggregation] to group your documents into clusters and displays metrics for each cluster. When results are less then `index.max_result_window`, the layer displays features from individual documents. * *Use vector tiles.* Vector tiles partition your map into 6 to 8 tiles. Each tile request is limited to the `index.max_result_window` index setting. diff --git a/x-pack/plugins/maps/public/classes/layers/file_upload_wizard/wizard.tsx b/x-pack/plugins/maps/public/classes/layers/file_upload_wizard/wizard.tsx index 024c2308df6c67..87747d915af4a7 100644 --- a/x-pack/plugins/maps/public/classes/layers/file_upload_wizard/wizard.tsx +++ b/x-pack/plugins/maps/public/classes/layers/file_upload_wizard/wizard.tsx @@ -106,7 +106,7 @@ export class ClientFileCreateSourceEditor extends Component { sourceDataRequest ); expect(areResultsTrimmed).toBe(true); - expect(tooltipContent).toBe('Results limited to first 1000 tracks of ~5000.'); + expect(tooltipContent).toBe('Results limited to first 1,000 tracks of ~5,000.'); }); it('Should show results trimmed icon and message when tracks are trimmed', () => { @@ -90,7 +90,7 @@ describe('getSourceTooltipContent', () => { ); expect(areResultsTrimmed).toBe(true); expect(tooltipContent).toBe( - 'Results limited to first 1000 tracks of ~5000. 10 of 1000 tracks are incomplete.' + 'Results limited to first 1,000 tracks of ~5,000. 10 of 1,000 tracks are incomplete.' ); }); }); diff --git a/x-pack/plugins/maps/public/classes/sources/es_geo_line_source/es_geo_line_source.tsx b/x-pack/plugins/maps/public/classes/sources/es_geo_line_source/es_geo_line_source.tsx index 460c1228e50a83..82be83dad43f7b 100644 --- a/x-pack/plugins/maps/public/classes/sources/es_geo_line_source/es_geo_line_source.tsx +++ b/x-pack/plugins/maps/public/classes/sources/es_geo_line_source/es_geo_line_source.tsx @@ -326,21 +326,21 @@ export class ESGeoLineSource extends AbstractESAggSource { ? i18n.translate('xpack.maps.esGeoLine.areEntitiesTrimmedMsg', { defaultMessage: `Results limited to first {entityCount} tracks of ~{totalEntities}.`, values: { - entityCount: meta.entityCount, - totalEntities: meta.totalEntities, + entityCount: meta.entityCount.toLocaleString(), + totalEntities: meta.totalEntities.toLocaleString(), }, }) : i18n.translate('xpack.maps.esGeoLine.tracksCountMsg', { defaultMessage: `Found {entityCount} tracks.`, - values: { entityCount: meta.entityCount }, + values: { entityCount: meta.entityCount.toLocaleString() }, }); const tracksTrimmedMsg = meta.numTrimmedTracks > 0 ? i18n.translate('xpack.maps.esGeoLine.tracksTrimmedMsg', { defaultMessage: `{numTrimmedTracks} of {entityCount} tracks are incomplete.`, values: { - entityCount: meta.entityCount, - numTrimmedTracks: meta.numTrimmedTracks, + entityCount: meta.entityCount.toLocaleString(), + numTrimmedTracks: meta.numTrimmedTracks.toLocaleString(), }, }) : undefined; diff --git a/x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx b/x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx index 343c366b548f6e..55eed588b8840c 100644 --- a/x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx +++ b/x-pack/plugins/maps/public/classes/sources/es_search_source/es_search_source.tsx @@ -620,17 +620,17 @@ export class ESSearchSource extends AbstractESSource implements ITiledSingleLaye ? i18n.translate('xpack.maps.esSearch.topHitsResultsTrimmedMsg', { defaultMessage: `Results limited to first {entityCount} entities of ~{totalEntities}.`, values: { - entityCount: meta.entityCount, - totalEntities: meta.totalEntities, + entityCount: meta.entityCount?.toLocaleString(), + totalEntities: meta.totalEntities?.toLocaleString(), }, }) : i18n.translate('xpack.maps.esSearch.topHitsEntitiesCountMsg', { defaultMessage: `Found {entityCount} entities.`, - values: { entityCount: meta.entityCount }, + values: { entityCount: meta.entityCount?.toLocaleString() }, }); const docsPerEntityMsg = i18n.translate('xpack.maps.esSearch.topHitsSizeMsg', { defaultMessage: `Showing top {topHitsSize} documents per entity.`, - values: { topHitsSize: this._descriptor.topHitsSize }, + values: { topHitsSize: this._descriptor.topHitsSize?.toLocaleString() }, }); return { @@ -645,7 +645,7 @@ export class ESSearchSource extends AbstractESSource implements ITiledSingleLaye return { tooltipContent: i18n.translate('xpack.maps.esSearch.resultsTrimmedMsg', { defaultMessage: `Results limited to first {count} documents.`, - values: { count: meta.resultsCount }, + values: { count: meta.resultsCount?.toLocaleString() }, }), areResultsTrimmed: true, }; @@ -654,7 +654,7 @@ export class ESSearchSource extends AbstractESSource implements ITiledSingleLaye return { tooltipContent: i18n.translate('xpack.maps.esSearch.featureCountMsg', { defaultMessage: `Found {count} documents.`, - values: { count: meta.resultsCount }, + values: { count: meta.resultsCount?.toLocaleString() }, }), areResultsTrimmed: false, }; diff --git a/x-pack/plugins/maps/public/classes/sources/es_search_source/util/__snapshots__/scaling_form.test.tsx.snap b/x-pack/plugins/maps/public/classes/sources/es_search_source/util/__snapshots__/scaling_form.test.tsx.snap index 03f2594f287eaf..99ce13ce326d6f 100644 --- a/x-pack/plugins/maps/public/classes/sources/es_search_source/util/__snapshots__/scaling_form.test.tsx.snap +++ b/x-pack/plugins/maps/public/classes/sources/es_search_source/util/__snapshots__/scaling_form.test.tsx.snap @@ -28,7 +28,7 @@ exports[`scaling form should disable clusters option when clustering is not supp @@ -114,14 +114,14 @@ exports[`scaling form should render 1`] = ` { state = { - maxResultWindow: DEFAULT_MAX_RESULT_WINDOW, + maxResultWindow: DEFAULT_MAX_RESULT_WINDOW.toLocaleString(), }; _isMounted = false; @@ -61,7 +61,7 @@ export class ScalingForm extends Component { const indexPattern = await getIndexPatternService().get(this.props.indexPatternId); const { maxResultWindow } = await loadIndexSettings(indexPattern!.title); if (this._isMounted) { - this.setState({ maxResultWindow }); + this.setState({ maxResultWindow: maxResultWindow.toLocaleString() }); } } catch (err) { return; @@ -90,7 +90,7 @@ export class ScalingForm extends Component { {