-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use max_inner_result_window to define top hits max
- Loading branch information
Showing
3 changed files
with
47 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
x-pack/legacy/plugins/maps/public/layers/sources/es_search_source/load_index_settings.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
import { | ||
DEFAULT_MAX_RESULT_WINDOW, | ||
DEFAULT_MAX_INNER_RESULT_WINDOW, | ||
GIS_API_PATH, | ||
} from '../../../../common/constants'; | ||
import { kfetch } from 'ui/kfetch'; | ||
|
||
export async function loadIndexSettings(indexPatternTitle) { | ||
try { | ||
const indexSettings = await kfetch({ | ||
pathname: `../${GIS_API_PATH}/indexSettings`, | ||
query: { | ||
indexPatternTitle, | ||
}, | ||
}); | ||
return indexSettings; | ||
} catch (err) { | ||
return { | ||
maxResultWindow: DEFAULT_MAX_RESULT_WINDOW, | ||
maxInnerResultWindow: DEFAULT_MAX_INNER_RESULT_WINDOW, | ||
}; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters