mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
# Backport This will backport the following commits from `main` to `8.x`: - [[ES `body` removal] `@elastic/appex-qa` (#204878)](https://github.com/elastic/kibana/pull/204878) <!--- Backport version: 9.4.3 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Alejandro Fernández Haro","email":"alejandro.haro@elastic.co"},"sourceCommit":{"committedDate":"2024-12-19T11:06:42Z","message":"[ES `body` removal] `@elastic/appex-qa` (#204878)\n\n## Summary\n\nAttempt to remove the deprecated `body` in the ES client.","sha":"b189fe715912ad83a37e6bb77e2084dbdc41604b","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","v9.0.0","backport:prev-minor"],"title":"[ES `body` removal] `@elastic/appex-qa`","number":204878,"url":"https://github.com/elastic/kibana/pull/204878","mergeCommit":{"message":"[ES `body` removal] `@elastic/appex-qa` (#204878)\n\n## Summary\n\nAttempt to remove the deprecated `body` in the ES client.","sha":"b189fe715912ad83a37e6bb77e2084dbdc41604b"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/204878","number":204878,"mergeCommit":{"message":"[ES `body` removal] `@elastic/appex-qa` (#204878)\n\n## Summary\n\nAttempt to remove the deprecated `body` in the ES client.","sha":"b189fe715912ad83a37e6bb77e2084dbdc41604b"}}]}] BACKPORT--> Co-authored-by: Alejandro Fernández Haro <alejandro.haro@elastic.co>
This commit is contained in:
parent
2e7e5164dd
commit
1e249672bb
3 changed files with 19 additions and 24 deletions
|
@ -10,7 +10,7 @@
|
|||
import { Transform, Readable } from 'stream';
|
||||
import { inspect } from 'util';
|
||||
|
||||
import * as estypes from '@elastic/elasticsearch/lib/api/typesWithBodyKey';
|
||||
import * as estypes from '@elastic/elasticsearch/lib/api/types';
|
||||
import type { Client } from '@elastic/elasticsearch';
|
||||
import { ToolingLog } from '@kbn/tooling-log';
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
import { Client } from '@elastic/elasticsearch';
|
||||
import { QueryDslQueryContainer } from '@elastic/elasticsearch/lib/api/types';
|
||||
import { SearchRequest, MsearchRequestItem } from '@elastic/elasticsearch/lib/api/typesWithBodyKey';
|
||||
import { SearchRequest, MsearchRequestItem } from '@elastic/elasticsearch/lib/api/types';
|
||||
import { ToolingLog } from '@kbn/tooling-log';
|
||||
|
||||
interface ClientOptions {
|
||||
|
@ -116,26 +116,24 @@ export class ESClient {
|
|||
async getTransactions<T>(queryFilters: QueryDslQueryContainer[]) {
|
||||
const searchRequest: SearchRequest = {
|
||||
index: this.tracesIndex,
|
||||
body: {
|
||||
sort: [
|
||||
{
|
||||
'@timestamp': {
|
||||
order: 'asc',
|
||||
unmapped_type: 'boolean',
|
||||
},
|
||||
sort: [
|
||||
{
|
||||
'@timestamp': {
|
||||
order: 'asc',
|
||||
unmapped_type: 'boolean',
|
||||
},
|
||||
],
|
||||
size: 10000,
|
||||
query: {
|
||||
bool: {
|
||||
filter: [
|
||||
{
|
||||
bool: {
|
||||
filter: queryFilters,
|
||||
},
|
||||
},
|
||||
],
|
||||
size: 10000,
|
||||
query: {
|
||||
bool: {
|
||||
filter: [
|
||||
{
|
||||
bool: {
|
||||
filter: queryFilters,
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
|
@ -5,10 +5,7 @@
|
|||
* 2.0.
|
||||
*/
|
||||
|
||||
import type {
|
||||
AggregationsAggregate,
|
||||
SearchResponse,
|
||||
} from '@elastic/elasticsearch/lib/api/typesWithBodyKey';
|
||||
import type { AggregationsAggregate, SearchResponse } from '@elastic/elasticsearch/lib/api/types';
|
||||
import { MetricThresholdParams } from '@kbn/infra-plugin/common/alerting/metrics';
|
||||
import { ThresholdParams } from '@kbn/observability-plugin/common/custom_threshold_rule/types';
|
||||
import { ApmRuleParamsType } from '@kbn/apm-plugin/common/rules/schema';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue