Skip to content

Commit

Permalink
support multiple indicies
Browse files Browse the repository at this point in the history
  • Loading branch information
darnautov committed Aug 23, 2023
1 parent 6218319 commit ba6599d
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ export abstract class AnomalyDetectionEmbeddable<
const indexPatterns: Record<string, DataView> = {};
for (const indexName of indices) {
const response = await this.dataViewsService.find(`"${indexName}"`);

const indexPattern = response.find(
(obj) => obj.getIndexPattern().toLowerCase() === indexName.toLowerCase()
const indexPattern = response.find((obj) =>
obj.getIndexPattern().toLowerCase().includes(indexName.toLowerCase())
);

if (indexPattern !== undefined) {
indexPatterns[indexPattern.id!] = indexPattern;
}
Expand Down

0 comments on commit ba6599d

Please sign in to comment.