Skip to content

Commit

Permalink
[Index Management] Indices list only load specific index properties f…
Browse files Browse the repository at this point in the history
…rom ES (elastic#123629)
  • Loading branch information
yuliacech authored Jan 25, 2022
1 parent 2325e45 commit f5e66d6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion x-pack/plugins/index_management/server/lib/fetch_indices.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ async function fetchIndicesCall(
const { body: indices } = await client.asCurrentUser.indices.get({
index: indexNamesString,
expand_wildcards: ['hidden', 'all'],
// only get specified properties in the response
filter_path: ['*.aliases', '*.settings.index.hidden', '*.data_stream'],
});

if (!Object.keys(indices).length) {
Expand Down Expand Up @@ -53,7 +55,7 @@ async function fetchIndicesCall(
isFrozen: hit.sth === 'true', // sth value coming back as a string from ES
aliases: aliases.length ? aliases : 'none',
// @ts-expect-error @elastic/elasticsearch https://github.com/elastic/elasticsearch-specification/issues/532
hidden: index.settings.index.hidden === 'true',
hidden: index.settings?.index.hidden === 'true',
data_stream: index.data_stream!,
});
}
Expand Down

0 comments on commit f5e66d6

Please sign in to comment.