Skip to content

Commit

Permalink
Add default size for custom vector map
Browse files Browse the repository at this point in the history
Signed-off-by: Vijayan Balasubramanian <balasvij@amazon.com>
  • Loading branch information
VijayanB committed Feb 8, 2023
1 parent d9dc91d commit be5f0ba
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- [VisBuilder] Fixes pipeline aggs ([#3137](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3137))
- [Region Maps] Fixes bug that prevents selected join field to be used ([#3213](Fix bug that prevents selected join field to be used))
- [Multi DataSource]Update test connection button text([#3247](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3247))
- [Region Maps] Add default size for custom vector map([#3399](https://github.com/opensearch-project/OpenSearch-Dashboards/pull/3399))

### 🚞 Infrastructure

Expand Down
1 change: 1 addition & 0 deletions src/plugins/region_map/common/constants/shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@

export const DEFAULT_MAP_CHOICE = 'default';
export const CUSTOM_MAP_CHOICE = 'custom';
export const DEFAULT_INDEX_FETCH_SIZE: number = 10_000; // opensearch index.max_result_window default value
3 changes: 2 additions & 1 deletion src/plugins/region_map/server/routes/opensearch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

import { schema } from '@osd/config-schema';
import { IRouter } from 'opensearch-dashboards/server';
import { DEFAULT_INDEX_FETCH_SIZE } from '../../common/constants/shared';

export function registerGeospatialRoutes(router: IRouter) {
router.post(
Expand Down Expand Up @@ -64,7 +65,7 @@ export function registerGeospatialRoutes(router: IRouter) {
const client = context.core.opensearch.client.asCurrentUser;
try {
const { index } = req.body;
const params = { index, body: {} };
const params = { index, body: {}, size: DEFAULT_INDEX_FETCH_SIZE };
const results = await client.search(params);
return res.ok({
body: {
Expand Down

0 comments on commit be5f0ba

Please sign in to comment.