Skip to content

Commit

Permalink
[Timelion ]Remove usage of ignore_throttled unless targeting frozen i…
Browse files Browse the repository at this point in the history
…ndices to avoid deprecation warning

Part of: elastic#117980
  • Loading branch information
alexwizp committed Nov 9, 2021
1 parent df71a4e commit 361a628
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,10 @@ export default function buildRequest(config, tlConfig, scriptFields, runtimeFiel

_.assign(aggCursor, createDateAgg(config, tlConfig, scriptFields));

const includeFrozen = Boolean(tlConfig.settings[UI_SETTINGS.SEARCH_INCLUDE_FROZEN]);
const request = {
index: config.index,
ignore_throttled: !tlConfig.settings[UI_SETTINGS.SEARCH_INCLUDE_FROZEN],
...(includeFrozen ? { ignore_throttled: false } : {}),
body: {
query: {
bool: bool,
Expand Down

0 comments on commit 361a628

Please sign in to comment.