Skip to content
This repository has been archived by the owner on Mar 31, 2024. It is now read-only.

Commit

Permalink
[RAM] allow no indices on alert search bar (elastic#145437)
Browse files Browse the repository at this point in the history
## Summary

Resolve: elastic#145246

Co-authored-by: Kibana Machine <[email protected]>
  • Loading branch information
XavierM and kibanamachine authored Nov 18, 2022
1 parent 2bd2226 commit beeea7d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -408,6 +408,7 @@ describe('ruleRegistrySearchStrategyProvider()', () => {
expect(searchStrategySearch).toHaveBeenCalledWith(
{
params: {
allow_no_indices: true,
body: {
_source: false,
fields: [
Expand All @@ -425,6 +426,7 @@ describe('ruleRegistrySearchStrategyProvider()', () => {
size: 1000,
sort: [],
},
ignore_unavailable: true,
index: ['test-testSpace*'],
},
},
Expand Down Expand Up @@ -461,6 +463,7 @@ describe('ruleRegistrySearchStrategyProvider()', () => {
expect(searchStrategySearch).toHaveBeenCalledWith(
{
params: {
allow_no_indices: true,
body: {
_source: false,
fields: [{ field: '@timestamp', include_unmapped: true }],
Expand All @@ -473,6 +476,7 @@ describe('ruleRegistrySearchStrategyProvider()', () => {
size: 1000,
sort: [],
},
ignore_unavailable: true,
index: ['test-testSpace*'],
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,9 @@ export const ruleRegistrySearchStrategyProvider = (
};
const size = request.pagination ? request.pagination.pageSize : MAX_ALERT_SEARCH_SIZE;
const params = {
allow_no_indices: true,
index: indices,
ignore_unavailable: true,
body: {
_source: false,
// TODO the fields need to come from the request
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export function useAlertDataView(featureIds: ValidFeatureId[]): AsyncState<DataV
}
);

return dataService.dataViews.create({ title: indexNames.join(',') });
return dataService.dataViews.create({ title: indexNames.join(','), allowNoIndex: true });
}, [features]);

return dataView;
Expand Down

0 comments on commit beeea7d

Please sign in to comment.