-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Discover][Context] Set trackTotalHits to false in requests to Elasti…
…csearch (#108661) (#109679) Co-authored-by: Matthias Wilhelm <[email protected]>
- Loading branch information
1 parent
c31154b
commit dfa1e83
Showing
7 changed files
with
183 additions
and
46 deletions.
There are no files selected for viewing
65 changes: 65 additions & 0 deletions
65
...lugins/discover/public/application/angular/context/api/__snapshots__/context.test.ts.snap
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
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
24 changes: 24 additions & 0 deletions
24
src/plugins/discover/public/application/angular/context/api/context.test.ts
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,24 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0 and the Server Side Public License, v 1; you may not use this file except | ||
* in compliance with, at your election, the Elastic License 2.0 or the Server | ||
* Side Public License, v 1. | ||
*/ | ||
|
||
import { updateSearchSource } from './context'; | ||
import { indexPatternMock } from '../../../../__mocks__/index_pattern'; | ||
import { createSearchSourceMock } from '../../../../../../data/public/mocks'; | ||
|
||
describe('context api', function () { | ||
test('createSearchSource when useFieldsApi is true', () => { | ||
const newSearchSource = createSearchSourceMock({ index: indexPatternMock }); | ||
const searchSource = updateSearchSource(newSearchSource, indexPatternMock, [], true); | ||
expect(searchSource.getSearchRequestBody()).toMatchSnapshot(); | ||
}); | ||
test('createSearchSource when useFieldsApi is false', () => { | ||
const newSearchSource = createSearchSourceMock({ index: indexPatternMock }); | ||
const searchSource = updateSearchSource(newSearchSource, indexPatternMock, [], false); | ||
expect(searchSource.getSearchRequestBody()).toMatchSnapshot(); | ||
}); | ||
}); |
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