Compare commits

..

6 Commits

Author SHA1 Message Date
43d553927c [8.5] Add a changelog for 8.5.0
Co-authored-by: Seth Michael Larson <seth.larson@elastic.co>
2022-11-03 11:42:31 -05:00
bd93eb0c15 Update APIs to 8.5-SNAPSHOT 2022-11-02 21:28:03 -05:00
1088053816 Update APIs for 8.5-SNAPSHOT 2022-10-28 15:57:24 -05:00
ea1cf7e633 Remove broken URLs from auto-generated docs 2022-09-28 11:32:10 -05:00
9fa98b4b5b Remove unnecessary ts-expect-error
Co-authored-by: Seth Michael Larson <seth.larson@elastic.co>
2022-09-27 07:52:23 -05:00
f96e80c575 Fix docs URLs to use '8.5' instead of 'master' 2022-09-27 06:41:15 -05:00
21 changed files with 581 additions and 1240 deletions

View File

@ -22,12 +22,12 @@
# - Use https only when TEST_SUITE is "platinum", when "free" use http
# - Set xpack.security.enabled=false for "free" and xpack.security.enabled=true for "platinum"
script_path=$(dirname "$(realpath -s "$0")")
source "$script_path/functions/imports.sh"
script_path=$(dirname $(realpath -s $0))
source $script_path/functions/imports.sh
set -euo pipefail
echo -e "\033[34;1mINFO:\033[0m Take down node if called twice with the same arguments (DETACH=true) or on separate terminals \033[0m"
cleanup_node "$es_node_name"
echo -e "\033[34;1mINFO:\033[0m Take down node if called twice with the same arguments (DETACH=true) or on seperate terminals \033[0m"
cleanup_node $es_node_name
master_node_name=${es_node_name}
cluster_name=${moniker}${suffix}

View File

@ -1,6 +1,6 @@
---
STACK_VERSION:
- "8.7.0-SNAPSHOT"
- "8.5.0-SNAPSHOT"
NODE_JS_VERSION:
- 18

View File

@ -1,11 +0,0 @@
.PHONY: integration-setup
integration-setup: integration-cleanup
DETACH=true .ci/run-elasticsearch.sh
.PHONY: integration-cleanup
integration-cleanup:
docker container rm --force --volumes instance || true
.PHONY: integration
integration: integration-setup
npm run test:integration

View File

@ -1,30 +1,6 @@
[[changelog-client]]
== Release notes
[discrete]
=== 8.7.0
[discrete]
===== Support for Elasticsearch `v8.7.0`
You can find all the API changes
https://www.elastic.co/guide/en/elasticsearch/reference/8.7/release-notes-8.7.0.html[here].
[discrete]
=== 8.6.0
[discrete]
===== Bump @elastic/transport to 8.3.1+ https://github.com/elastic/elasticsearch-js/pull/1802[#1802]
The `@elastic/transport` dependency has been bumped to `~8.3.1` to ensure
fixes to the `maxResponseSize` option are available in the client.
[discrete]
===== Support for Elasticsearch `v8.6.0`
You can find all the API changes
https://www.elastic.co/guide/en/elasticsearch/reference/8.6/release-notes-8.6.0.html[here].
[discrete]
=== 8.5.0

View File

@ -77,8 +77,8 @@ async function run () {
// fix the document before to try it again.
status: action[operation].status,
error: action[operation].error,
operation: operations[i * 2],
document: operations[i * 2 + 1]
operation: body[i * 2],
document: body[i * 2 + 1]
})
}
})

View File

@ -1,185 +0,0 @@
<style>
* {
box-sizing: border-box;
}
.card {
cursor: pointer;
padding: 16px;
text-align: left;
color: #000;
}
.card:hover {
box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
padding: 16px;
text-align: left;
}
#guide a.no-text-decoration:hover {
text-decoration: none!important;
}
.icon {
width: 24px;
height: 24px;
background-position: bottom;
background-size: contain;
background-repeat: no-repeat;
}
.ul-col-1 {
columns: 1;
-webkit-columns: 1;
-moz-columns: 1;
}
@media (min-width:769px) {
.ul-col-md-2 {
columns: 2;
-webkit-columns: 2;
-moz-columns: 2;
}
}
#guide h3.gtk {
margin-top: 16px;
}
.mb-4, .my-4 {
margin-bottom: 0!important;
}
</style>
<div class="legalnotice"></div>
<div class="row my-4">
<div class="col-md-6 col-12">
<p></p>
<p>
<h2>Documentation</h2>
</p>
<p>
The official Node.js client provides one-to-one mapping with Elasticsearch REST APIs.
</p>
<p>
<a href="https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/installation.html">
<button class="btn btn-primary">Get started</button>
</a>
</p>
</div>
<div class="col-md-6 col-12">
<img class="w-100" src="https://images.contentstack.io/v3/assets/bltefdd0b53724fa2ce/blt3826dd36882ab258/641c4e9d542f593a7e8ba656/js-es-lp-hero.png" />
</div>
</div>
<h3 class="gtk">Get to know the JavaScript client</h3>
<div class="my-5">
<div class="d-flex align-items-center mb-3">
<h4 class="mt-3">
<span class="inline-block float-left icon mr-2" style="background-image: url('https://images.contentstack.io/v3/assets/bltefdd0b53724fa2ce/bltfd59779217093221/641ae0c8db18f61d68e9c377/64x64_Color_icon-connected-circles64-color.png');"></span>
Connecting
</h4>
</div>
<ul class="ul-col-md-2 ul-col-1">
<li>
<a href="introduction.html">Introduction to the client</a>
</li>
<li>
<a href="installation.html">Installing the client</a>
</li>
<li>
<a href="client-connecting.html">Connecting to Elasticsearch</a>
</li>
<li>
<a href="client-configuration.html">Configuration options</a>
</li>
</ul>
</div>
<div class="my-5">
<div class="d-flex align-items-center mb-3">
<h4 class="mt-3">
<span class="inline-block float-left icon mr-2" style="background-image: url('https://images.contentstack.io/v3/assets/bltefdd0b53724fa2ce/bltca09fd8c807816ce/641ae17733e7f95594918557/icon-monitor-cog-64-color.png');"></span>
Using the JS client
</h4>
</div>
<ul class="ul-col-md-2 ul-col-1">
<li>
<a href="bulk_examples.html">Bulk indexing</a>
</li>
<li>
<a href="get_examples.html">Getting documents</a>
</li>
<li>
<a href="search_examples.html">Searching</a>
</li>
<li>
<a href="examples.html">More examples</a>
</li>
</ul>
</div>
<div class="my-5">
<div class="d-flex align-items-center mb-3">
<h4 class="mt-3">
<span class="inline-block float-left icon mr-2" style="background-image: url('https://images.contentstack.io/v3/assets/bltefdd0b53724fa2ce/blteacd058910f155d8/636925a6e0ff7c532db636d7/64x64_Color_icon-dev-tools-64-color.png');"></span>
API and developer docs
</h4>
</div>
<ul class="ul-col-md-2 ul-col-1">
<li>
<a href="api-reference.html">API reference</a>
</li>
<li>
<a href="client-helpers.html">Client helpers</a>
</li>
<li>
<a href="integrations.html">Integrations</a>
</li>
<li>
<a href="changelog-client.html">Release notes</a>
</li>
</ul>
</div>
<h3 class="explore">Explore by use case</h3>
<div class="row my-4">
<div class="col-md-4 col-12 mb-2">
<a class="no-text-decoration" href="https://www.elastic.co/guide/en/enterprise-search/current/start.html">
<div class="card h-100">
<h4 class="mt-3">
<span class="inline-block float-left icon mr-2" style="background-image: url('https://images.contentstack.io/v3/assets/bltefdd0b53724fa2ce/blt11200907c1c033aa/634d9da119d8652169cf9b2b/enterprise-search-logo-color-32px.png');"></span>
Search my data
</h4>
<p>Create search experiences for your content, wherever it lives.</p>
</div>
</a>
</div>
<div class="col-md-4 col-12 mb-2">
<a class="no-text-decoration" href="https://www.elastic.co/guide/en/welcome-to-elastic/current/getting-started-observability.html">
<div class="card h-100">
<h4 class="mt-3">
<span class="inline-block float-left icon mr-2" style="background-image: url('https://images.contentstack.io/v3/assets/bltefdd0b53724fa2ce/bltaa08b370a00bbecc/634d9da14e565f1cdce27f7c/observability-logo-color-32px.png');"></span>
Observe my data
</h4>
<p>Follow our guides to monitor logs, metrics, and traces.</p>
</div>
</a>
</div>
<div class="col-md-4 col-12 mb-2">
<a class="no-text-decoration" href="https://www.elastic.co/guide/en/security/current/es-overview.html">
<div class="card h-100">
<h4 class="mt-3">
<span class="inline-block float-left icon mr-2" style="background-image: url('https://images.contentstack.io/v3/assets/bltefdd0b53724fa2ce/blt5e0e0ad9a13e6b8c/634d9da18473831f96bbdf1e/security-logo-color-32px.png');"></span>
Protect my environment
</h4>
<p>Learn how to defend against threats across your environment.</p>
</div>
</a>
</div>
</div>
<p class="my-4"><a href="https://www.elastic.co/guide/index.html">View all Elastic docs</a></p>

View File

@ -1,6 +1,6 @@
= Elasticsearch JavaScript Client
include::{asciidoc-dir}/../../shared/versions/stack/{source_branch}.asciidoc[]
:branch: master
include::{asciidoc-dir}/../../shared/attributes.asciidoc[]
include::introduction.asciidoc[]

View File

@ -154,6 +154,9 @@ request: {
The event order is described in the following graph, in some edge cases, the
order is not guaranteed.
You can find in
https://github.com/elastic/elasticsearch-js/blob/main/test/acceptance/events-order.test.js[`test/acceptance/events-order.test.js`]
how the order changes based on the situation.
[source]
----

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +1,7 @@
{
"name": "@elastic/elasticsearch",
"version": "8.7.0",
"versionCanary": "8.7.0-canary.1",
"version": "8.5.0",
"versionCanary": "8.5.0-canary.0",
"description": "The official Elasticsearch client for Node.js",
"main": "index.js",
"types": "index.d.ts",
@ -81,7 +81,7 @@
"zx": "^6.1.0"
},
"dependencies": {
"@elastic/transport": "^8.3.1",
"@elastic/transport": "^8.2.0",
"tslib": "^2.4.0"
},
"tap": {
@ -91,4 +91,4 @@
"coverage": false,
"check-coverage": false
}
}
}

View File

@ -228,7 +228,7 @@ function generateSingleApi (version, spec, common) {
${genUrlValidation(paths, api)}
let { ${genQueryDenylist(false)}, ...querystring } = params
let { ${genQueryBlacklist(false)}, ...querystring } = params
querystring = snakeCaseKeys(acceptedQuerystring, snakeCase, querystring)
let path = ''
@ -316,20 +316,20 @@ function generateSingleApi (version, spec, common) {
}, {})
}
function genQueryDenylist (addQuotes = true) {
function genQueryBlacklist (addQuotes = true) {
const toCamelCase = str => {
return str[0] === '_'
? '_' + str.slice(1).replace(/_([a-z])/g, k => k[1].toUpperCase())
: str.replace(/_([a-z])/g, k => k[1].toUpperCase())
}
const denylist = ['method', 'body']
const blacklist = ['method', 'body']
parts.forEach(p => {
const camelStr = toCamelCase(p)
if (camelStr !== p) denylist.push(`${camelStr}`)
denylist.push(`${p}`)
if (camelStr !== p) blacklist.push(`${camelStr}`)
blacklist.push(`${p}`)
})
return addQuotes ? denylist.map(q => `'${q}'`) : denylist
return addQuotes ? blacklist.map(q => `'${q}'`) : blacklist
}
function buildPath () {

View File

@ -279,7 +279,7 @@ export default class Cluster {
async putComponentTemplate (this: That, params: T.ClusterPutComponentTemplateRequest | TB.ClusterPutComponentTemplateRequest, options?: TransportRequestOptions): Promise<T.ClusterPutComponentTemplateResponse>
async putComponentTemplate (this: That, params: T.ClusterPutComponentTemplateRequest | TB.ClusterPutComponentTemplateRequest, options?: TransportRequestOptions): Promise<any> {
const acceptedPath: string[] = ['name']
const acceptedBody: string[] = ['template', 'version', '_meta', 'allow_auto_create']
const acceptedBody: string[] = ['template', 'aliases', 'mappings', 'settings', 'version', '_meta']
const querystring: Record<string, any> = {}
// @ts-expect-error
const userBody: any = params?.body

View File

@ -1,67 +0,0 @@
/*
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
/* eslint-disable import/export */
/* eslint-disable @typescript-eslint/no-misused-new */
/* eslint-disable @typescript-eslint/no-extraneous-class */
/* eslint-disable @typescript-eslint/no-unused-vars */
// This file was automatically generated by elastic/elastic-client-generator-js
// DO NOT MODIFY IT BY HAND. Instead, modify the source open api file,
// and elastic/elastic-client-generator-js to regenerate this file again.
import {
Transport,
TransportRequestOptions,
TransportRequestOptionsWithMeta,
TransportRequestOptionsWithOutMeta,
TransportResult
} from '@elastic/transport'
import * as T from '../types'
import * as TB from '../typesWithBodyKey'
interface That { transport: Transport }
export default async function HealthReportApi (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithOutMeta): Promise<T.TODO>
export default async function HealthReportApi (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.TODO, unknown>>
export default async function HealthReportApi (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<T.TODO>
export default async function HealthReportApi (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<any> {
const acceptedPath: string[] = ['feature']
const querystring: Record<string, any> = {}
const body = undefined
params = params ?? {}
for (const key in params) {
if (acceptedPath.includes(key)) {
continue
} else if (key !== 'body') {
querystring[key] = params[key]
}
}
let method = ''
let path = ''
if (params.feature != null) {
method = 'GET'
path = `/_health_report/${encodeURIComponent(params.feature.toString())}`
} else {
method = 'GET'
path = '/_health_report'
}
return await this.transport.request({ path, method, querystring, body }, options)
}

View File

@ -2006,7 +2006,7 @@ export default class Ml {
async updateDatafeed (this: That, params: T.MlUpdateDatafeedRequest | TB.MlUpdateDatafeedRequest, options?: TransportRequestOptions): Promise<T.MlUpdateDatafeedResponse>
async updateDatafeed (this: That, params: T.MlUpdateDatafeedRequest | TB.MlUpdateDatafeedRequest, options?: TransportRequestOptions): Promise<any> {
const acceptedPath: string[] = ['datafeed_id']
const acceptedBody: string[] = ['aggregations', 'chunking_config', 'delayed_data_check_config', 'frequency', 'indices', 'indexes', 'indices_options', 'job_id', 'max_empty_searches', 'query', 'query_delay', 'runtime_mappings', 'script_fields', 'scroll_size']
const acceptedBody: string[] = ['aggregations', 'chunking_config', 'delayed_data_check_config', 'frequency', 'indices', 'indexes', 'indices_options', 'max_empty_searches', 'query', 'query_delay', 'runtime_mappings', 'script_fields', 'scroll_size']
const querystring: Record<string, any> = {}
// @ts-expect-error
const userBody: any = params?.body
@ -2074,7 +2074,7 @@ export default class Ml {
async updateJob (this: That, params: T.MlUpdateJobRequest | TB.MlUpdateJobRequest, options?: TransportRequestOptions): Promise<T.MlUpdateJobResponse>
async updateJob (this: That, params: T.MlUpdateJobRequest | TB.MlUpdateJobRequest, options?: TransportRequestOptions): Promise<any> {
const acceptedPath: string[] = ['job_id']
const acceptedBody: string[] = ['allow_lazy_open', 'analysis_limits', 'background_persist_interval', 'custom_settings', 'categorization_filters', 'description', 'model_plot_config', 'model_prune_window', 'daily_model_snapshot_retention_after_days', 'model_snapshot_retention_days', 'renormalization_window_days', 'results_retention_days', 'groups', 'detectors', 'per_partition_categorization']
const acceptedBody: string[] = ['allow_lazy_open', 'analysis_limits', 'background_persist_interval', 'custom_settings', 'categorization_filters', 'description', 'model_plot_config', 'daily_model_snapshot_retention_after_days', 'model_snapshot_retention_days', 'renormalization_window_days', 'results_retention_days', 'groups', 'detectors', 'per_partition_categorization']
const querystring: Record<string, any> = {}
// @ts-expect-error
const userBody: any = params?.body
@ -2137,28 +2137,6 @@ export default class Ml {
return await this.transport.request({ path, method, querystring, body }, options)
}
async updateTrainedModelDeployment (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithOutMeta): Promise<T.TODO>
async updateTrainedModelDeployment (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.TODO, unknown>>
async updateTrainedModelDeployment (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<T.TODO>
async updateTrainedModelDeployment (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<any> {
const acceptedPath: string[] = ['model_id']
const querystring: Record<string, any> = {}
const body = undefined
params = params ?? {}
for (const key in params) {
if (acceptedPath.includes(key)) {
continue
} else if (key !== 'body') {
querystring[key] = params[key]
}
}
const method = 'POST'
const path = `/_ml/trained_models/${encodeURIComponent(params.model_id.toString())}/deployment/_update`
return await this.transport.request({ path, method, querystring, body }, options)
}
async upgradeJobSnapshot (this: That, params: T.MlUpgradeJobSnapshotRequest | TB.MlUpgradeJobSnapshotRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.MlUpgradeJobSnapshotResponse>
async upgradeJobSnapshot (this: That, params: T.MlUpgradeJobSnapshotRequest | TB.MlUpgradeJobSnapshotRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.MlUpgradeJobSnapshotResponse, unknown>>
async upgradeJobSnapshot (this: That, params: T.MlUpgradeJobSnapshotRequest | TB.MlUpgradeJobSnapshotRequest, options?: TransportRequestOptions): Promise<T.MlUpgradeJobSnapshotResponse>

View File

@ -42,7 +42,7 @@ export default async function SearchMvtApi (this: That, params: T.SearchMvtReque
export default async function SearchMvtApi (this: That, params: T.SearchMvtRequest | TB.SearchMvtRequest, options?: TransportRequestOptions): Promise<T.SearchMvtResponse>
export default async function SearchMvtApi (this: That, params: T.SearchMvtRequest | TB.SearchMvtRequest, options?: TransportRequestOptions): Promise<any> {
const acceptedPath: string[] = ['index', 'field', 'zoom', 'x', 'y']
const acceptedBody: string[] = ['aggs', 'buffer', 'exact_bounds', 'extent', 'fields', 'grid_agg', 'grid_precision', 'grid_type', 'query', 'runtime_mappings', 'size', 'sort', 'track_total_hits', 'with_labels']
const acceptedBody: string[] = ['aggs', 'exact_bounds', 'extent', 'fields', 'grid_precision', 'grid_type', 'query', 'runtime_mappings', 'size', 'sort', 'track_total_hits']
const querystring: Record<string, any> = {}
// @ts-expect-error
const userBody: any = params?.body

View File

@ -215,28 +215,6 @@ export default class Transform {
return await this.transport.request({ path, method, querystring, body }, options)
}
async scheduleNowTransform (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithOutMeta): Promise<T.TODO>
async scheduleNowTransform (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.TODO, unknown>>
async scheduleNowTransform (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<T.TODO>
async scheduleNowTransform (this: That, params?: T.TODO | TB.TODO, options?: TransportRequestOptions): Promise<any> {
const acceptedPath: string[] = ['transform_id']
const querystring: Record<string, any> = {}
const body = undefined
params = params ?? {}
for (const key in params) {
if (acceptedPath.includes(key)) {
continue
} else if (key !== 'body') {
querystring[key] = params[key]
}
}
const method = 'POST'
const path = `/_transform/${encodeURIComponent(params.transform_id.toString())}/_schedule_now`
return await this.transport.request({ path, method, querystring, body }, options)
}
async startTransform (this: That, params: T.TransformStartTransformRequest | TB.TransformStartTransformRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.TransformStartTransformResponse>
async startTransform (this: That, params: T.TransformStartTransformRequest | TB.TransformStartTransformRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.TransformStartTransformResponse, unknown>>
async startTransform (this: That, params: T.TransformStartTransformRequest | TB.TransformStartTransformRequest, options?: TransportRequestOptions): Promise<T.TransformStartTransformResponse>

View File

@ -55,7 +55,6 @@ import getScriptContextApi from './api/get_script_context'
import getScriptLanguagesApi from './api/get_script_languages'
import getSourceApi from './api/get_source'
import GraphApi from './api/graph'
import healthReportApi from './api/health_report'
import IlmApi from './api/ilm'
import indexApi from './api/index'
import IndicesApi from './api/indices'
@ -135,7 +134,6 @@ export default interface API {
getScriptLanguages: typeof getScriptLanguagesApi
getSource: typeof getSourceApi
graph: GraphApi
healthReport: typeof healthReportApi
ilm: IlmApi
index: typeof indexApi
indices: IndicesApi
@ -308,7 +306,6 @@ API.prototype.getScript = getScriptApi
API.prototype.getScriptContext = getScriptContextApi
API.prototype.getScriptLanguages = getScriptLanguagesApi
API.prototype.getSource = getSourceApi
API.prototype.healthReport = healthReportApi
API.prototype.index = indexApi
API.prototype.info = infoApi
API.prototype.knnSearch = knnSearchApi

View File

@ -502,11 +502,13 @@ export interface KnnSearchResponse<TDocument = unknown> {
export interface KnnSearchQuery {
field: Field
query_vector: QueryVector
query_vector: KnnSearchQueryVector
k: long
num_candidates: long
}
export type KnnSearchQueryVector = double[]
export interface MgetMultiGetError {
error: ErrorCause
_id: Id
@ -697,9 +699,6 @@ export interface OpenPointInTimeRequest extends RequestBase {
index: Indices
keep_alive: Duration
ignore_unavailable?: boolean
preference?: string
routing?: Routing
expand_wildcards?: ExpandWildcards
}
export interface OpenPointInTimeResponse {
@ -995,7 +994,7 @@ export interface SearchRequest extends RequestBase {
track_total_hits?: SearchTrackHits
indices_boost?: Record<IndexName, double>[]
docvalue_fields?: (QueryDslFieldAndFormat | Field)[]
knn?: KnnQuery | KnnQuery[]
knn?: KnnQuery
min_score?: double
post_filter?: QueryDslQueryContainer
profile?: boolean
@ -1138,7 +1137,8 @@ export interface SearchCompletionSuggestOption<TDocument = unknown> {
export interface SearchCompletionSuggester extends SearchSuggesterBase {
contexts?: Record<Field, SearchCompletionContext | SearchContext | (SearchCompletionContext | SearchContext)[]>
fuzzy?: SearchSuggestFuzziness
regex?: SearchRegexOptions
prefix?: string
regex?: string
skip_duplicates?: boolean
}
@ -1392,11 +1392,6 @@ export interface SearchQueryProfile {
children?: SearchQueryProfile[]
}
export interface SearchRegexOptions {
flags?: integer | string
max_determinized_states?: integer
}
export interface SearchRescore {
query: SearchRescoreQuery
window_size?: integer
@ -1520,11 +1515,9 @@ export interface SearchMvtRequest extends RequestBase {
x: SearchMvtCoordinate
y: SearchMvtCoordinate
aggs?: Record<string, AggregationsAggregationContainer>
buffer?: integer
exact_bounds?: boolean
extent?: integer
fields?: Fields
grid_agg?: SearchMvtGridAggregationType
grid_precision?: integer
grid_type?: SearchMvtGridType
query?: QueryDslQueryContainer
@ -1532,15 +1525,12 @@ export interface SearchMvtRequest extends RequestBase {
size?: integer
sort?: Sort
track_total_hits?: SearchTrackHits
with_labels?: boolean
}
export type SearchMvtResponse = MapboxVectorTiles
export type SearchMvtCoordinate = integer
export type SearchMvtGridAggregationType = 'geotile' | 'geohex'
export type SearchMvtGridType = 'grid' | 'point' | 'centroid'
export type SearchMvtZoomLevel = integer
@ -2047,7 +2037,6 @@ export interface IndexingStats {
index_total: long
index_failed: long
types?: Record<string, IndexingStats>
write_load?: double
}
export type Indices = IndexName | IndexName[]
@ -2084,8 +2073,7 @@ export type Ip = string
export interface KnnQuery {
field: Field
query_vector?: QueryVector
query_vector_builder?: QueryVectorBuilder
query_vector: double[]
k: long
num_candidates: long
boost?: float
@ -2150,7 +2138,7 @@ export interface NodeAttributes {
name: NodeName
transport_address: TransportAddress
roles?: NodeRoles
external_id?: string
external_id: string
}
export type NodeId = string
@ -2173,7 +2161,6 @@ export interface NodeShard {
recovery_source?: Record<string, Id>
unassigned_info?: ClusterAllocationExplainUnassignedInformation
relocating_node?: NodeId | null
relocation_failure_info?: RelocationFailureInfo
}
export interface NodeStatistics {
@ -2203,6 +2190,7 @@ export interface PluginStats {
name: Name
version: VersionString
licensed: boolean
type: string
}
export type PropertyName = string
@ -2213,17 +2201,11 @@ export interface QueryCacheStats {
evictions: integer
hit_count: integer
memory_size?: ByteSize
memory_size_in_bytes: long
memory_size_in_bytes: integer
miss_count: integer
total_count: integer
}
export type QueryVector = float[]
export interface QueryVectorBuilder {
text_embedding?: TextEmbedding
}
export interface RecoveryStats {
current_as_source: long
current_as_target: long
@ -2244,10 +2226,6 @@ export interface RefreshStats {
export type RelationName = string
export interface RelocationFailureInfo {
failed_attempts: integer
}
export interface RequestBase extends SpecUtilsCommonQueryParameters {
}
@ -2337,28 +2315,28 @@ export type SearchType = 'query_then_fetch' | 'dfs_query_then_fetch'
export interface SegmentsStats {
count: integer
doc_values_memory?: ByteSize
doc_values_memory_in_bytes: long
doc_values_memory_in_bytes: integer
file_sizes: Record<string, IndicesStatsShardFileSizeInfo>
fixed_bit_set?: ByteSize
fixed_bit_set_memory_in_bytes: long
fixed_bit_set_memory_in_bytes: integer
index_writer_memory?: ByteSize
index_writer_max_memory_in_bytes?: long
index_writer_memory_in_bytes: long
index_writer_max_memory_in_bytes?: integer
index_writer_memory_in_bytes: integer
max_unsafe_auto_id_timestamp: long
memory?: ByteSize
memory_in_bytes: long
memory_in_bytes: integer
norms_memory?: ByteSize
norms_memory_in_bytes: long
norms_memory_in_bytes: integer
points_memory?: ByteSize
points_memory_in_bytes: long
points_memory_in_bytes: integer
stored_memory?: ByteSize
stored_fields_memory_in_bytes: long
terms_memory_in_bytes: long
stored_fields_memory_in_bytes: integer
terms_memory_in_bytes: integer
terms_memory?: ByteSize
term_vectory_memory?: ByteSize
term_vectors_memory_in_bytes: long
term_vectors_memory_in_bytes: integer
version_map_memory?: ByteSize
version_map_memory_in_bytes: long
version_map_memory_in_bytes: integer
}
export type SequenceNumber = long
@ -2416,11 +2394,11 @@ export type SortResults = FieldValue[]
export interface StoreStats {
size?: ByteSize
size_in_bytes: long
size_in_bytes: integer
reserved?: ByteSize
reserved_in_bytes: long
reserved_in_bytes: integer
total_data_set_size?: ByteSize
total_data_set_size_in_bytes?: long
total_data_set_size_in_bytes?: integer
}
export interface StoredScript {
@ -2446,11 +2424,6 @@ export interface TaskFailure {
export type TaskId = string | integer
export interface TextEmbedding {
model_id: string
model_text: string
}
export type ThreadType = 'cpu' | 'wait' | 'block' | 'gpu' | 'mem'
export type TimeOfDay = string
@ -3286,7 +3259,7 @@ export interface AggregationsMatrixAggregation extends AggregationsAggregation {
export interface AggregationsMatrixStatsAggregate extends AggregationsAggregateBase {
doc_count: long
fields?: AggregationsMatrixStatsFields[]
fields: AggregationsMatrixStatsFields[]
}
export interface AggregationsMatrixStatsAggregation extends AggregationsMatrixAggregation {
@ -3381,7 +3354,6 @@ export interface AggregationsMultiBucketBase {
export interface AggregationsMultiTermLookup {
field: Field
missing?: AggregationsMissing
}
export interface AggregationsMultiTermsAggregate extends AggregationsTermsAggregateBase<AggregationsMultiTermsBucket> {
@ -4845,6 +4817,7 @@ export interface MappingPointProperty extends MappingDocValuesPropertyBase {
export type MappingProperty = MappingBinaryProperty | MappingBooleanProperty | MappingDynamicProperty | MappingJoinProperty | MappingKeywordProperty | MappingMatchOnlyTextProperty | MappingPercolatorProperty | MappingRankFeatureProperty | MappingRankFeaturesProperty | MappingSearchAsYouTypeProperty | MappingTextProperty | MappingVersionProperty | MappingWildcardProperty | MappingDateNanosProperty | MappingDateProperty | MappingAggregateMetricDoubleProperty | MappingDenseVectorProperty | MappingFlattenedProperty | MappingNestedProperty | MappingObjectProperty | MappingCompletionProperty | MappingConstantKeywordProperty | MappingFieldAliasProperty | MappingHistogramProperty | MappingIpProperty | MappingMurmur3HashProperty | MappingTokenCountProperty | MappingGeoPointProperty | MappingGeoShapeProperty | MappingPointProperty | MappingShapeProperty | MappingByteNumberProperty | MappingDoubleNumberProperty | MappingFloatNumberProperty | MappingHalfFloatNumberProperty | MappingIntegerNumberProperty | MappingLongNumberProperty | MappingScaledFloatNumberProperty | MappingShortNumberProperty | MappingUnsignedLongNumberProperty | MappingDateRangeProperty | MappingDoubleRangeProperty | MappingFloatRangeProperty | MappingIntegerRangeProperty | MappingIpRangeProperty | MappingLongRangeProperty
export interface MappingPropertyBase {
local_metadata?: Metadata
meta?: Record<string, string>
properties?: Record<PropertyName, MappingProperty>
ignore_above?: integer
@ -4872,21 +4845,12 @@ export interface MappingRoutingField {
}
export interface MappingRuntimeField {
fetch_fields?: (MappingRuntimeFieldFetchFields | Field)[]
format?: string
input_field?: Field
target_field?: Field
target_index?: IndexName
script?: Script
type: MappingRuntimeFieldType
}
export interface MappingRuntimeFieldFetchFields {
field: Field
format?: string
}
export type MappingRuntimeFieldType = 'boolean' | 'date' | 'double' | 'geo_point' | 'ip' | 'keyword' | 'long' | 'lookup'
export type MappingRuntimeFieldType = 'boolean' | 'date' | 'double' | 'geo_point' | 'ip' | 'keyword' | 'long'
export type MappingRuntimeFields = Record<Field, MappingRuntimeField>
@ -4984,7 +4948,7 @@ export interface MappingTypeMapping {
date_detection?: boolean
dynamic?: MappingDynamicMapping
dynamic_date_formats?: string[]
dynamic_templates?: Record<string, MappingDynamicTemplate>[]
dynamic_templates?: Record<string, MappingDynamicTemplate> | Record<string, MappingDynamicTemplate>[]
_field_names?: MappingFieldNamesField
index_field?: MappingIndexField
_meta?: Metadata
@ -5958,7 +5922,7 @@ export type CatCatDfaColumns = CatCatDfaColumn | CatCatDfaColumn[]
export interface CatCatRequestBase extends RequestBase, SpecUtilsCommonCatQueryParameters {
}
export type CatCatTrainedModelsColumn = 'create_time' | 'ct' | 'created_by' | 'c' | 'createdBy' | 'data_frame_analytics_id' | 'df' | 'dataFrameAnalytics' | 'dfid' | 'description' | 'd' | 'heap_size' | 'hs' | 'modelHeapSize' | 'id' | 'ingest.count' | 'ic' | 'ingestCount' | 'ingest.current' | 'icurr' | 'ingestCurrent' | 'ingest.failed' | 'if' | 'ingestFailed' | 'ingest.pipelines' | 'ip' | 'ingestPipelines' | 'ingest.time' | 'it' | 'ingestTime' | 'license' | 'l' | 'operations' | 'o' | 'modelOperations' | 'version' | 'v'
export type CatCatTrainedModelsColumn = 'create_time' | 'ct' | 'created_by' | 'c' | 'createdBy' | 'data_frame_analytics_id' | 'df' | 'dataFrameAnalytics' | 'description' | 'd' | 'heap_size' | 'hs' | 'modelHeapSize' | 'id' | 'ingest.count' | 'ic' | 'ingestCount' | 'ingest.current' | 'icurr' | 'ingestCurrent' | 'ingest.failed' | 'if' | 'ingestFailed' | 'ingest.pipelines' | 'ip' | 'ingestPipelines' | 'ingest.time' | 'it' | 'ingestTime' | 'license' | 'l' | 'operations' | 'o' | 'modelOperations' | 'version' | 'v'
export type CatCatTrainedModelsColumns = CatCatTrainedModelsColumn | CatCatTrainedModelsColumn[]
@ -6441,7 +6405,6 @@ export interface CatIndicesRequest extends CatCatRequestBase {
health?: HealthStatus
include_unloaded_segments?: boolean
pri?: boolean
time?: TimeUnit
}
export type CatIndicesResponse = CatIndicesIndicesRecord[]
@ -8235,9 +8198,11 @@ export interface ClusterPutComponentTemplateRequest extends RequestBase {
create?: boolean
master_timeout?: Duration
template: IndicesIndexState
aliases?: Record<string, IndicesAliasDefinition>
mappings?: MappingTypeMapping
settings?: IndicesIndexSettings
version?: VersionNumber
_meta?: Metadata
allow_auto_create?: boolean
}
export type ClusterPutComponentTemplateResponse = AcknowledgedResponseBase
@ -8353,7 +8318,7 @@ export interface ClusterRerouteRerouteParameters {
export interface ClusterRerouteResponse {
acknowledged: boolean
explanations?: ClusterRerouteRerouteExplanation[]
state?: any
state: any
}
export interface ClusterStateRequest extends RequestBase {
@ -8536,19 +8501,12 @@ export interface ClusterStatsFieldTypes {
name: Name
count: integer
index_count: integer
indexed_vector_count?: long
indexed_vector_dim_max?: long
indexed_vector_dim_min?: long
script_count?: integer
}
export interface ClusterStatsFieldTypesMappings {
field_types: ClusterStatsFieldTypes[]
runtime_field_types?: ClusterStatsRuntimeFieldTypes[]
total_field_count?: integer
total_deduplicated_field_count?: integer
total_deduplicated_mapping_size?: ByteSize
total_deduplicated_mapping_size_in_bytes?: long
}
export interface ClusterStatsIndexingPressure {
@ -9047,7 +9005,6 @@ export interface IlmPhase {
export interface IlmPhases {
cold?: IlmPhase
delete?: IlmPhase
frozen?: IlmPhase
hot?: IlmPhase
warm?: IlmPhase
}
@ -9616,7 +9573,7 @@ export interface IndicesStorage {
allow_mmap?: boolean
}
export type IndicesStorageType = 'fs' | '' | 'niofs' | 'mmapfs' | 'hybridfs'| string
export type IndicesStorageType = 'fs' | '' | 'niofs' | 'mmapfs' | 'hybridfs'
export interface IndicesTemplateMapping {
aliases: Record<IndexName, IndicesAlias>
@ -10449,13 +10406,10 @@ export interface IndicesRolloverRolloverConditions {
min_docs?: long
max_docs?: long
max_size?: ByteSize
max_size_bytes?: long
min_size?: ByteSize
min_size_bytes?: long
max_size_bytes?: ByteSize
max_primary_shard_size?: ByteSize
max_primary_shard_size_bytes?: long
min_primary_shard_size?: ByteSize
min_primary_shard_size_bytes?: long
max_primary_shard_docs?: long
min_primary_shard_docs?: long
}
@ -10483,6 +10437,7 @@ export interface IndicesSegmentsSegment {
compound: boolean
deleted_docs: long
generation: integer
memory_in_bytes: double
search: boolean
size_in_bytes: double
num_docs: long
@ -10518,13 +10473,16 @@ export interface IndicesShardStoresResponse {
indices: Record<IndexName, IndicesShardStoresIndicesShardStores>
}
export interface IndicesShardStoresShardStoreKeys {
export interface IndicesShardStoresShardStore {
allocation: IndicesShardStoresShardStoreAllocation
allocation_id?: Id
store_exception?: IndicesShardStoresShardStoreException
allocation_id: Id
attributes: Record<string, any>
id: Id
legacy_version: VersionNumber
name: Name
store_exception: IndicesShardStoresShardStoreException
transport_address: TransportAddress
}
export type IndicesShardStoresShardStore = IndicesShardStoresShardStoreKeys
& { [property: string]: IndicesShardStoresShardStoreNode | IndicesShardStoresShardStoreAllocation | Id | IndicesShardStoresShardStoreException }
export type IndicesShardStoresShardStoreAllocation = 'primary' | 'replica' | 'unused'
@ -10533,15 +10491,6 @@ export interface IndicesShardStoresShardStoreException {
type: string
}
export interface IndicesShardStoresShardStoreNode {
attributes: Record<string, string>
ephemeral_id?: string
external_id?: string
name: Name
roles: string[]
transport_address: TransportAddress
}
export type IndicesShardStoresShardStoreStatus = 'green' | 'yellow' | 'red' | 'all'
export interface IndicesShardStoresShardStoreWrapper {
@ -10653,12 +10602,6 @@ export interface IndicesStatsIndicesStats {
status?: IndicesStatsIndexMetadataState
}
export interface IndicesStatsMappingStats {
total_count: long
total_estimated_overhead?: ByteSize
total_estimated_overhead_in_bytes: long
}
export interface IndicesStatsRequest extends RequestBase {
metric?: Metrics
index?: Indices
@ -10747,7 +10690,6 @@ export interface IndicesStatsShardStats {
flush?: FlushStats
get?: GetStats
indexing?: IndexingStats
mappings?: IndicesStatsMappingStats
merges?: MergesStats
shard_path?: IndicesStatsShardPath
query_cache?: IndicesStatsShardQueryCache
@ -10763,7 +10705,7 @@ export interface IndicesStatsShardStats {
translog?: TranslogStats
warmer?: WarmerStats
bulk?: BulkStats
shards?: Record<IndexName, any>
shards?: IndicesStatsShardsTotalStats
shard_stats?: IndicesStatsShardsTotalStats
indices?: IndicesStatsIndicesStats
}
@ -11484,7 +11426,7 @@ export interface MigrationPostFeatureUpgradeResponse {
}
export interface MlAnalysisConfig {
bucket_span?: Duration
bucket_span: Duration
categorization_analyzer?: MlCategorizationAnalyzer
categorization_field_name?: Field
categorization_filters?: string[]
@ -11522,7 +11464,6 @@ export interface MlAnalysisMemoryLimit {
export interface MlAnomaly {
actual?: double[]
anomaly_score_explanation?: MlAnomalyExplanation
bucket_span: DurationValue<UnitSeconds>
by_field_name?: string
by_field_value?: string
@ -11531,7 +11472,6 @@ export interface MlAnomaly {
field_name?: string
function?: string
function_description?: string
geo_results?: MlGeoResults
influencers?: MlInfluence[]
initial_record_score: double
is_interim: boolean
@ -11564,19 +11504,6 @@ export interface MlAnomalyCause {
typical: double[]
}
export interface MlAnomalyExplanation {
anomaly_characteristics_impact?: integer
anomaly_length?: integer
anomaly_type?: string
high_variance_penalty?: boolean
incomplete_bucket_penalty?: boolean
lower_confidence_bound?: double
multi_bucket_impact?: integer
single_bucket_impact?: integer
typical_value?: double
upper_confidence_bound?: double
}
export interface MlApiKeyAuthorization {
id: string
name: string
@ -11728,12 +11655,12 @@ export interface MlDatafeedConfig {
datafeed_id?: Id
delayed_data_check_config?: MlDelayedDataCheckConfig
frequency?: Duration
indices?: string[]
indexes?: string[]
indices: string[]
indices_options?: IndicesOptions
job_id?: Id
max_empty_searches?: integer
query?: QueryDslQueryContainer
query: QueryDslQueryContainer
query_delay?: Duration
runtime_mappings?: MappingRuntimeFields
script_fields?: Record<string, ScriptField>
@ -12039,7 +11966,7 @@ export interface MlDetector {
detector_index?: integer
exclude_frequent?: MlExcludeFrequent
field_name?: Field
function?: string
function: string
over_field_name?: Field
partition_field_name?: Field
use_null?: boolean
@ -12093,11 +12020,6 @@ export interface MlFilterRef {
export type MlFilterType = 'include' | 'exclude'
export interface MlGeoResults {
actual_point: string
typical_point: string
}
export interface MlHyperparameter {
absolute_importance?: double
name: Name
@ -12332,7 +12254,6 @@ export interface MlNerInferenceOptions {
tokenization?: MlTokenizationConfigContainer
results_field?: string
classification_labels?: string[]
vocabulary?: MlVocabulary
}
export interface MlNerInferenceUpdateOptions {
@ -12393,7 +12314,6 @@ export interface MlPage {
export interface MlPassThroughInferenceOptions {
tokenization?: MlTokenizationConfigContainer
results_field?: string
vocabulary?: MlVocabulary
}
export interface MlPassThroughInferenceUpdateOptions {
@ -12509,7 +12429,6 @@ export interface MlTotalFeatureImportanceStatistics {
export interface MlTrainedModelAssignment {
assignment_state: MlDeploymentAssignmentState
max_assigned_allocations?: integer
routing_table: Record<string, MlTrainedModelAssignmentRoutingTable>
start_time: DateTime
task_parameters: MlTrainedModelAssignmentTaskParameters
@ -12527,7 +12446,6 @@ export interface MlTrainedModelAssignmentTaskParameters {
model_id: Id
cache_size: ByteSize
number_of_allocations: integer
priority: MlTrainingPriority
queue_capacity: integer
threads_per_allocation: integer
}
@ -12586,7 +12504,6 @@ export interface MlTrainedModelDeploymentNodesStats {
export interface MlTrainedModelDeploymentStats {
allocation_status: MlTrainedModelDeploymentAllocationStatus
cache_size?: ByteSize
error_count: integer
inference_count: integer
model_id: Id
@ -12652,8 +12569,6 @@ export interface MlTrainedModelStats {
export type MlTrainedModelType = 'tree_ensemble' | 'lang_ident' | 'pytorch'
export type MlTrainingPriority = 'normal' | 'low'
export interface MlTransformAuthorization {
api_key?: MlApiKeyAuthorization
roles?: string[]
@ -12665,10 +12580,6 @@ export interface MlValidationLoss {
loss_type: string
}
export interface MlVocabulary {
index: IndexName
}
export interface MlZeroShotClassificationInferenceOptions {
tokenization?: MlTokenizationConfigContainer
hypothesis_template?: string
@ -12771,7 +12682,6 @@ export type MlDeleteForecastResponse = AcknowledgedResponseBase
export interface MlDeleteJobRequest extends RequestBase {
job_id: Id
force?: boolean
delete_user_annotations?: boolean
wait_for_completion?: boolean
}
@ -13304,7 +13214,6 @@ export interface MlOpenJobRequest extends RequestBase {
export interface MlOpenJobResponse {
opened: boolean
node: NodeId
}
export interface MlPostCalendarEventsRequest extends RequestBase {
@ -13360,8 +13269,6 @@ export interface MlPreviewDataFrameAnalyticsResponse {
export interface MlPreviewDatafeedRequest extends RequestBase {
datafeed_id?: Id
start?: DateTime
end?: DateTime
datafeed_config?: MlDatafeedConfig
job_config?: MlJobConfig
}
@ -13446,16 +13353,16 @@ export interface MlPutDatafeedRequest extends RequestBase {
}
export interface MlPutDatafeedResponse {
aggregations?: Record<string, AggregationsAggregationContainer>
aggregations: Record<string, AggregationsAggregationContainer>
authorization?: MlDatafeedAuthorization
chunking_config: MlChunkingConfig
delayed_data_check_config?: MlDelayedDataCheckConfig
datafeed_id: Id
frequency?: Duration
frequency: Duration
indices: string[]
job_id: Id
indices_options?: IndicesOptions
max_empty_searches?: integer
max_empty_searches: integer
query: QueryDslQueryContainer
query_delay: Duration
runtime_mappings?: MappingRuntimeFields
@ -13565,7 +13472,7 @@ export interface MlPutTrainedModelRequest extends RequestBase {
definition?: MlPutTrainedModelDefinition
description?: string
inference_config: MlInferenceConfigCreateContainer
input?: MlPutTrainedModelInput
input: MlPutTrainedModelInput
metadata?: any
model_type?: MlTrainedModelType
model_size_bytes?: long
@ -13639,7 +13546,6 @@ export type MlPutTrainedModelVocabularyResponse = AcknowledgedResponseBase
export interface MlResetJobRequest extends RequestBase {
job_id: Id
wait_for_completion?: boolean
delete_user_annotations?: boolean
}
export type MlResetJobResponse = AcknowledgedResponseBase
@ -13687,7 +13593,6 @@ export interface MlStartTrainedModelDeploymentRequest extends RequestBase {
model_id: Id
cache_size?: ByteSize
number_of_allocations?: integer
priority?: MlTrainingPriority
queue_capacity?: integer
threads_per_allocation?: integer
timeout?: Duration
@ -13766,7 +13671,6 @@ export interface MlUpdateDatafeedRequest extends RequestBase {
indices?: string[]
indexes?: string[]
indices_options?: IndicesOptions
job_id?: Id
max_empty_searches?: integer
query?: QueryDslQueryContainer
query_delay?: Duration
@ -13777,15 +13681,15 @@ export interface MlUpdateDatafeedRequest extends RequestBase {
export interface MlUpdateDatafeedResponse {
authorization?: MlDatafeedAuthorization
aggregations?: Record<string, AggregationsAggregationContainer>
aggregations: Record<string, AggregationsAggregationContainer>
chunking_config: MlChunkingConfig
delayed_data_check_config?: MlDelayedDataCheckConfig
datafeed_id: Id
frequency?: Duration
frequency: Duration
indices: string[]
indices_options?: IndicesOptions
job_id: Id
max_empty_searches?: integer
max_empty_searches: integer
query: QueryDslQueryContainer
query_delay: Duration
runtime_mappings?: MappingRuntimeFields
@ -13815,7 +13719,6 @@ export interface MlUpdateJobRequest extends RequestBase {
categorization_filters?: string[]
description?: string
model_plot_config?: MlModelPlotConfig
model_prune_window?: Duration
daily_model_snapshot_retention_after_days?: long
model_snapshot_retention_days?: long
renormalization_window_days?: long
@ -13910,9 +13813,9 @@ export interface MonitoringBulkResponse {
export interface NodesAdaptiveSelection {
avg_queue_size?: long
avg_response_time?: Duration
avg_response_time?: long
avg_response_time_ns?: long
avg_service_time?: Duration
avg_service_time?: string
avg_service_time_ns?: long
outgoing_searches?: long
rank?: string
@ -14086,7 +13989,6 @@ export interface NodesIndexingPressure {
}
export interface NodesIndexingPressureMemory {
limit?: ByteSize
limit_in_bytes?: long
current?: NodesPressureMemory
total?: NodesPressureMemory
@ -14204,16 +14106,11 @@ export interface NodesPool {
}
export interface NodesPressureMemory {
all?: ByteSize
all_in_bytes?: long
combined_coordinating_and_primary?: ByteSize
combined_coordinating_and_primary_in_bytes?: long
coordinating?: ByteSize
coordinating_in_bytes?: long
primary?: ByteSize
primary_in_bytes?: long
replica?: ByteSize
replica_in_bytes?: long
all_in_bytes?: long
coordinating_rejections?: long
primary_rejections?: long
replica_rejections?: long
@ -14289,7 +14186,6 @@ export interface NodesScriptCache {
export interface NodesScripting {
cache_evictions?: long
compilations?: long
compilations_history?: Record<string, long>
compilation_limit_triggered?: long
contexts?: NodesContext[]
}
@ -14711,8 +14607,8 @@ export interface NodesInfoNodeJvmInfo {
vm_name: Name
vm_vendor: string
vm_version: VersionString
using_bundled_jdk: boolean
bundled_jdk: boolean
using_bundled_jdk: boolean
using_compressed_ordinary_object_pointers?: boolean | string
input_arguments: string[]
}
@ -14916,18 +14812,12 @@ export interface RollupGetRollupCapsRollupCapabilities {
}
export interface RollupGetRollupCapsRollupCapabilitySummary {
fields: Record<Field, RollupGetRollupCapsRollupFieldSummary[]>
fields: Record<Field, Record<string, any>>
index_pattern: string
job_id: string
rollup_index: string
}
export interface RollupGetRollupCapsRollupFieldSummary {
agg: string
calendar_interval?: Duration
time_zone?: TimeZone
}
export interface RollupGetRollupIndexCapsIndexCapabilities {
rollup_jobs: RollupGetRollupIndexCapsRollupJobSummary[]
}
@ -16804,7 +16694,6 @@ export interface TransformGetTransformStatsRequest extends RequestBase {
allow_no_match?: boolean
from?: long
size?: long
timeout?: Duration
}
export interface TransformGetTransformStatsResponse {
@ -16842,7 +16731,6 @@ export interface TransformGetTransformStatsTransformProgress {
export interface TransformGetTransformStatsTransformStats {
checkpointing: TransformGetTransformStatsCheckpointing
health?: TransformGetTransformStatsTransformStatsHealth
id: Id
node?: NodeAttributes
reason?: string
@ -16850,10 +16738,6 @@ export interface TransformGetTransformStatsTransformStats {
stats: TransformGetTransformStatsTransformIndexerStats
}
export interface TransformGetTransformStatsTransformStatsHealth {
status: HealthStatus
}
export interface TransformPreviewTransformRequest extends RequestBase {
transform_id?: Id
timeout?: Duration
@ -17831,10 +17715,6 @@ export interface XpackUsageFrozenIndices extends XpackUsageBase {
indices_count: long
}
export interface XpackUsageHealthStatistics extends XpackUsageBase {
invocations: XpackUsageInvocations
}
export interface XpackUsageIlm {
policy_count: integer
policy_stats: XpackUsageIlmPolicyStatistics[]
@ -17845,10 +17725,6 @@ export interface XpackUsageIlmPolicyStatistics {
phases: IlmPhases
}
export interface XpackUsageInvocations {
total: long
}
export interface XpackUsageIpFilter {
http: boolean
transport: boolean
@ -17941,7 +17817,6 @@ export interface XpackUsageMlInferenceTrainedModelsCount {
regression?: long
classification?: long
ner?: long
text_embedding?: long
}
export interface XpackUsageMlJobForecasts {
@ -17995,7 +17870,6 @@ export interface XpackUsageResponse {
flattened?: XpackUsageFlattened
frozen_indices: XpackUsageFrozenIndices
graph: XpackUsageBase
health_api?: XpackUsageHealthStatistics
ilm: XpackUsageIlm
logstash: XpackUsageBase
ml: XpackUsageMachineLearning

View File

@ -527,11 +527,13 @@ export interface KnnSearchResponse<TDocument = unknown> {
export interface KnnSearchQuery {
field: Field
query_vector: QueryVector
query_vector: KnnSearchQueryVector
k: long
num_candidates: long
}
export type KnnSearchQueryVector = double[]
export interface MgetMultiGetError {
error: ErrorCause
_id: Id
@ -730,9 +732,6 @@ export interface OpenPointInTimeRequest extends RequestBase {
index: Indices
keep_alive: Duration
ignore_unavailable?: boolean
preference?: string
routing?: Routing
expand_wildcards?: ExpandWildcards
}
export interface OpenPointInTimeResponse {
@ -1049,7 +1048,7 @@ export interface SearchRequest extends RequestBase {
track_total_hits?: SearchTrackHits
indices_boost?: Record<IndexName, double>[]
docvalue_fields?: (QueryDslFieldAndFormat | Field)[]
knn?: KnnQuery | KnnQuery[]
knn?: KnnQuery
min_score?: double
post_filter?: QueryDslQueryContainer
profile?: boolean
@ -1193,7 +1192,8 @@ export interface SearchCompletionSuggestOption<TDocument = unknown> {
export interface SearchCompletionSuggester extends SearchSuggesterBase {
contexts?: Record<Field, SearchCompletionContext | SearchContext | (SearchCompletionContext | SearchContext)[]>
fuzzy?: SearchSuggestFuzziness
regex?: SearchRegexOptions
prefix?: string
regex?: string
skip_duplicates?: boolean
}
@ -1447,11 +1447,6 @@ export interface SearchQueryProfile {
children?: SearchQueryProfile[]
}
export interface SearchRegexOptions {
flags?: integer | string
max_determinized_states?: integer
}
export interface SearchRescore {
query: SearchRescoreQuery
window_size?: integer
@ -1577,11 +1572,9 @@ export interface SearchMvtRequest extends RequestBase {
/** @deprecated The use of the 'body' key has been deprecated, move the nested keys to the top level object. */
body?: {
aggs?: Record<string, AggregationsAggregationContainer>
buffer?: integer
exact_bounds?: boolean
extent?: integer
fields?: Fields
grid_agg?: SearchMvtGridAggregationType
grid_precision?: integer
grid_type?: SearchMvtGridType
query?: QueryDslQueryContainer
@ -1589,7 +1582,6 @@ export interface SearchMvtRequest extends RequestBase {
size?: integer
sort?: Sort
track_total_hits?: SearchTrackHits
with_labels?: boolean
}
}
@ -1597,8 +1589,6 @@ export type SearchMvtResponse = MapboxVectorTiles
export type SearchMvtCoordinate = integer
export type SearchMvtGridAggregationType = 'geotile' | 'geohex'
export type SearchMvtGridType = 'grid' | 'point' | 'centroid'
export type SearchMvtZoomLevel = integer
@ -2120,7 +2110,6 @@ export interface IndexingStats {
index_total: long
index_failed: long
types?: Record<string, IndexingStats>
write_load?: double
}
export type Indices = IndexName | IndexName[]
@ -2157,8 +2146,7 @@ export type Ip = string
export interface KnnQuery {
field: Field
query_vector?: QueryVector
query_vector_builder?: QueryVectorBuilder
query_vector: double[]
k: long
num_candidates: long
boost?: float
@ -2223,7 +2211,7 @@ export interface NodeAttributes {
name: NodeName
transport_address: TransportAddress
roles?: NodeRoles
external_id?: string
external_id: string
}
export type NodeId = string
@ -2246,7 +2234,6 @@ export interface NodeShard {
recovery_source?: Record<string, Id>
unassigned_info?: ClusterAllocationExplainUnassignedInformation
relocating_node?: NodeId | null
relocation_failure_info?: RelocationFailureInfo
}
export interface NodeStatistics {
@ -2276,6 +2263,7 @@ export interface PluginStats {
name: Name
version: VersionString
licensed: boolean
type: string
}
export type PropertyName = string
@ -2286,17 +2274,11 @@ export interface QueryCacheStats {
evictions: integer
hit_count: integer
memory_size?: ByteSize
memory_size_in_bytes: long
memory_size_in_bytes: integer
miss_count: integer
total_count: integer
}
export type QueryVector = float[]
export interface QueryVectorBuilder {
text_embedding?: TextEmbedding
}
export interface RecoveryStats {
current_as_source: long
current_as_target: long
@ -2317,10 +2299,6 @@ export interface RefreshStats {
export type RelationName = string
export interface RelocationFailureInfo {
failed_attempts: integer
}
export interface RequestBase extends SpecUtilsCommonQueryParameters {
}
@ -2410,28 +2388,28 @@ export type SearchType = 'query_then_fetch' | 'dfs_query_then_fetch'
export interface SegmentsStats {
count: integer
doc_values_memory?: ByteSize
doc_values_memory_in_bytes: long
doc_values_memory_in_bytes: integer
file_sizes: Record<string, IndicesStatsShardFileSizeInfo>
fixed_bit_set?: ByteSize
fixed_bit_set_memory_in_bytes: long
fixed_bit_set_memory_in_bytes: integer
index_writer_memory?: ByteSize
index_writer_max_memory_in_bytes?: long
index_writer_memory_in_bytes: long
index_writer_max_memory_in_bytes?: integer
index_writer_memory_in_bytes: integer
max_unsafe_auto_id_timestamp: long
memory?: ByteSize
memory_in_bytes: long
memory_in_bytes: integer
norms_memory?: ByteSize
norms_memory_in_bytes: long
norms_memory_in_bytes: integer
points_memory?: ByteSize
points_memory_in_bytes: long
points_memory_in_bytes: integer
stored_memory?: ByteSize
stored_fields_memory_in_bytes: long
terms_memory_in_bytes: long
stored_fields_memory_in_bytes: integer
terms_memory_in_bytes: integer
terms_memory?: ByteSize
term_vectory_memory?: ByteSize
term_vectors_memory_in_bytes: long
term_vectors_memory_in_bytes: integer
version_map_memory?: ByteSize
version_map_memory_in_bytes: long
version_map_memory_in_bytes: integer
}
export type SequenceNumber = long
@ -2489,11 +2467,11 @@ export type SortResults = FieldValue[]
export interface StoreStats {
size?: ByteSize
size_in_bytes: long
size_in_bytes: integer
reserved?: ByteSize
reserved_in_bytes: long
reserved_in_bytes: integer
total_data_set_size?: ByteSize
total_data_set_size_in_bytes?: long
total_data_set_size_in_bytes?: integer
}
export interface StoredScript {
@ -2519,11 +2497,6 @@ export interface TaskFailure {
export type TaskId = string | integer
export interface TextEmbedding {
model_id: string
model_text: string
}
export type ThreadType = 'cpu' | 'wait' | 'block' | 'gpu' | 'mem'
export type TimeOfDay = string
@ -3359,7 +3332,7 @@ export interface AggregationsMatrixAggregation extends AggregationsAggregation {
export interface AggregationsMatrixStatsAggregate extends AggregationsAggregateBase {
doc_count: long
fields?: AggregationsMatrixStatsFields[]
fields: AggregationsMatrixStatsFields[]
}
export interface AggregationsMatrixStatsAggregation extends AggregationsMatrixAggregation {
@ -3454,7 +3427,6 @@ export interface AggregationsMultiBucketBase {
export interface AggregationsMultiTermLookup {
field: Field
missing?: AggregationsMissing
}
export interface AggregationsMultiTermsAggregate extends AggregationsTermsAggregateBase<AggregationsMultiTermsBucket> {
@ -4918,6 +4890,7 @@ export interface MappingPointProperty extends MappingDocValuesPropertyBase {
export type MappingProperty = MappingBinaryProperty | MappingBooleanProperty | MappingDynamicProperty | MappingJoinProperty | MappingKeywordProperty | MappingMatchOnlyTextProperty | MappingPercolatorProperty | MappingRankFeatureProperty | MappingRankFeaturesProperty | MappingSearchAsYouTypeProperty | MappingTextProperty | MappingVersionProperty | MappingWildcardProperty | MappingDateNanosProperty | MappingDateProperty | MappingAggregateMetricDoubleProperty | MappingDenseVectorProperty | MappingFlattenedProperty | MappingNestedProperty | MappingObjectProperty | MappingCompletionProperty | MappingConstantKeywordProperty | MappingFieldAliasProperty | MappingHistogramProperty | MappingIpProperty | MappingMurmur3HashProperty | MappingTokenCountProperty | MappingGeoPointProperty | MappingGeoShapeProperty | MappingPointProperty | MappingShapeProperty | MappingByteNumberProperty | MappingDoubleNumberProperty | MappingFloatNumberProperty | MappingHalfFloatNumberProperty | MappingIntegerNumberProperty | MappingLongNumberProperty | MappingScaledFloatNumberProperty | MappingShortNumberProperty | MappingUnsignedLongNumberProperty | MappingDateRangeProperty | MappingDoubleRangeProperty | MappingFloatRangeProperty | MappingIntegerRangeProperty | MappingIpRangeProperty | MappingLongRangeProperty
export interface MappingPropertyBase {
local_metadata?: Metadata
meta?: Record<string, string>
properties?: Record<PropertyName, MappingProperty>
ignore_above?: integer
@ -4945,21 +4918,12 @@ export interface MappingRoutingField {
}
export interface MappingRuntimeField {
fetch_fields?: (MappingRuntimeFieldFetchFields | Field)[]
format?: string
input_field?: Field
target_field?: Field
target_index?: IndexName
script?: Script
type: MappingRuntimeFieldType
}
export interface MappingRuntimeFieldFetchFields {
field: Field
format?: string
}
export type MappingRuntimeFieldType = 'boolean' | 'date' | 'double' | 'geo_point' | 'ip' | 'keyword' | 'long' | 'lookup'
export type MappingRuntimeFieldType = 'boolean' | 'date' | 'double' | 'geo_point' | 'ip' | 'keyword' | 'long'
export type MappingRuntimeFields = Record<Field, MappingRuntimeField>
@ -5057,7 +5021,7 @@ export interface MappingTypeMapping {
date_detection?: boolean
dynamic?: MappingDynamicMapping
dynamic_date_formats?: string[]
dynamic_templates?: Record<string, MappingDynamicTemplate>[]
dynamic_templates?: Record<string, MappingDynamicTemplate> | Record<string, MappingDynamicTemplate>[]
_field_names?: MappingFieldNamesField
index_field?: MappingIndexField
_meta?: Metadata
@ -6035,7 +5999,7 @@ export type CatCatDfaColumns = CatCatDfaColumn | CatCatDfaColumn[]
export interface CatCatRequestBase extends RequestBase, SpecUtilsCommonCatQueryParameters {
}
export type CatCatTrainedModelsColumn = 'create_time' | 'ct' | 'created_by' | 'c' | 'createdBy' | 'data_frame_analytics_id' | 'df' | 'dataFrameAnalytics' | 'dfid' | 'description' | 'd' | 'heap_size' | 'hs' | 'modelHeapSize' | 'id' | 'ingest.count' | 'ic' | 'ingestCount' | 'ingest.current' | 'icurr' | 'ingestCurrent' | 'ingest.failed' | 'if' | 'ingestFailed' | 'ingest.pipelines' | 'ip' | 'ingestPipelines' | 'ingest.time' | 'it' | 'ingestTime' | 'license' | 'l' | 'operations' | 'o' | 'modelOperations' | 'version' | 'v'
export type CatCatTrainedModelsColumn = 'create_time' | 'ct' | 'created_by' | 'c' | 'createdBy' | 'data_frame_analytics_id' | 'df' | 'dataFrameAnalytics' | 'description' | 'd' | 'heap_size' | 'hs' | 'modelHeapSize' | 'id' | 'ingest.count' | 'ic' | 'ingestCount' | 'ingest.current' | 'icurr' | 'ingestCurrent' | 'ingest.failed' | 'if' | 'ingestFailed' | 'ingest.pipelines' | 'ip' | 'ingestPipelines' | 'ingest.time' | 'it' | 'ingestTime' | 'license' | 'l' | 'operations' | 'o' | 'modelOperations' | 'version' | 'v'
export type CatCatTrainedModelsColumns = CatCatTrainedModelsColumn | CatCatTrainedModelsColumn[]
@ -6518,7 +6482,6 @@ export interface CatIndicesRequest extends CatCatRequestBase {
health?: HealthStatus
include_unloaded_segments?: boolean
pri?: boolean
time?: TimeUnit
}
export type CatIndicesResponse = CatIndicesIndicesRecord[]
@ -8329,9 +8292,11 @@ export interface ClusterPutComponentTemplateRequest extends RequestBase {
/** @deprecated The use of the 'body' key has been deprecated, move the nested keys to the top level object. */
body?: {
template: IndicesIndexState
aliases?: Record<string, IndicesAliasDefinition>
mappings?: MappingTypeMapping
settings?: IndicesIndexSettings
version?: VersionNumber
_meta?: Metadata
allow_auto_create?: boolean
}
}
@ -8454,7 +8419,7 @@ export interface ClusterRerouteRerouteParameters {
export interface ClusterRerouteResponse {
acknowledged: boolean
explanations?: ClusterRerouteRerouteExplanation[]
state?: any
state: any
}
export interface ClusterStateRequest extends RequestBase {
@ -8637,19 +8602,12 @@ export interface ClusterStatsFieldTypes {
name: Name
count: integer
index_count: integer
indexed_vector_count?: long
indexed_vector_dim_max?: long
indexed_vector_dim_min?: long
script_count?: integer
}
export interface ClusterStatsFieldTypesMappings {
field_types: ClusterStatsFieldTypes[]
runtime_field_types?: ClusterStatsRuntimeFieldTypes[]
total_field_count?: integer
total_deduplicated_field_count?: integer
total_deduplicated_mapping_size?: ByteSize
total_deduplicated_mapping_size_in_bytes?: long
}
export interface ClusterStatsIndexingPressure {
@ -9161,7 +9119,6 @@ export interface IlmPhase {
export interface IlmPhases {
cold?: IlmPhase
delete?: IlmPhase
frozen?: IlmPhase
hot?: IlmPhase
warm?: IlmPhase
}
@ -9739,7 +9696,7 @@ export interface IndicesStorage {
allow_mmap?: boolean
}
export type IndicesStorageType = 'fs' | '' | 'niofs' | 'mmapfs' | 'hybridfs'| string
export type IndicesStorageType = 'fs' | '' | 'niofs' | 'mmapfs' | 'hybridfs'
export interface IndicesTemplateMapping {
aliases: Record<IndexName, IndicesAlias>
@ -10601,13 +10558,10 @@ export interface IndicesRolloverRolloverConditions {
min_docs?: long
max_docs?: long
max_size?: ByteSize
max_size_bytes?: long
min_size?: ByteSize
min_size_bytes?: long
max_size_bytes?: ByteSize
max_primary_shard_size?: ByteSize
max_primary_shard_size_bytes?: long
min_primary_shard_size?: ByteSize
min_primary_shard_size_bytes?: long
max_primary_shard_docs?: long
min_primary_shard_docs?: long
}
@ -10635,6 +10589,7 @@ export interface IndicesSegmentsSegment {
compound: boolean
deleted_docs: long
generation: integer
memory_in_bytes: double
search: boolean
size_in_bytes: double
num_docs: long
@ -10670,13 +10625,16 @@ export interface IndicesShardStoresResponse {
indices: Record<IndexName, IndicesShardStoresIndicesShardStores>
}
export interface IndicesShardStoresShardStoreKeys {
export interface IndicesShardStoresShardStore {
allocation: IndicesShardStoresShardStoreAllocation
allocation_id?: Id
store_exception?: IndicesShardStoresShardStoreException
allocation_id: Id
attributes: Record<string, any>
id: Id
legacy_version: VersionNumber
name: Name
store_exception: IndicesShardStoresShardStoreException
transport_address: TransportAddress
}
export type IndicesShardStoresShardStore = IndicesShardStoresShardStoreKeys
& { [property: string]: IndicesShardStoresShardStoreNode | IndicesShardStoresShardStoreAllocation | Id | IndicesShardStoresShardStoreException }
export type IndicesShardStoresShardStoreAllocation = 'primary' | 'replica' | 'unused'
@ -10685,15 +10643,6 @@ export interface IndicesShardStoresShardStoreException {
type: string
}
export interface IndicesShardStoresShardStoreNode {
attributes: Record<string, string>
ephemeral_id?: string
external_id?: string
name: Name
roles: string[]
transport_address: TransportAddress
}
export type IndicesShardStoresShardStoreStatus = 'green' | 'yellow' | 'red' | 'all'
export interface IndicesShardStoresShardStoreWrapper {
@ -10815,12 +10764,6 @@ export interface IndicesStatsIndicesStats {
status?: IndicesStatsIndexMetadataState
}
export interface IndicesStatsMappingStats {
total_count: long
total_estimated_overhead?: ByteSize
total_estimated_overhead_in_bytes: long
}
export interface IndicesStatsRequest extends RequestBase {
metric?: Metrics
index?: Indices
@ -10909,7 +10852,6 @@ export interface IndicesStatsShardStats {
flush?: FlushStats
get?: GetStats
indexing?: IndexingStats
mappings?: IndicesStatsMappingStats
merges?: MergesStats
shard_path?: IndicesStatsShardPath
query_cache?: IndicesStatsShardQueryCache
@ -10925,7 +10867,7 @@ export interface IndicesStatsShardStats {
translog?: TranslogStats
warmer?: WarmerStats
bulk?: BulkStats
shards?: Record<IndexName, any>
shards?: IndicesStatsShardsTotalStats
shard_stats?: IndicesStatsShardsTotalStats
indices?: IndicesStatsIndicesStats
}
@ -11662,7 +11604,7 @@ export interface MigrationPostFeatureUpgradeResponse {
}
export interface MlAnalysisConfig {
bucket_span?: Duration
bucket_span: Duration
categorization_analyzer?: MlCategorizationAnalyzer
categorization_field_name?: Field
categorization_filters?: string[]
@ -11700,7 +11642,6 @@ export interface MlAnalysisMemoryLimit {
export interface MlAnomaly {
actual?: double[]
anomaly_score_explanation?: MlAnomalyExplanation
bucket_span: DurationValue<UnitSeconds>
by_field_name?: string
by_field_value?: string
@ -11709,7 +11650,6 @@ export interface MlAnomaly {
field_name?: string
function?: string
function_description?: string
geo_results?: MlGeoResults
influencers?: MlInfluence[]
initial_record_score: double
is_interim: boolean
@ -11742,19 +11682,6 @@ export interface MlAnomalyCause {
typical: double[]
}
export interface MlAnomalyExplanation {
anomaly_characteristics_impact?: integer
anomaly_length?: integer
anomaly_type?: string
high_variance_penalty?: boolean
incomplete_bucket_penalty?: boolean
lower_confidence_bound?: double
multi_bucket_impact?: integer
single_bucket_impact?: integer
typical_value?: double
upper_confidence_bound?: double
}
export interface MlApiKeyAuthorization {
id: string
name: string
@ -11906,12 +11833,12 @@ export interface MlDatafeedConfig {
datafeed_id?: Id
delayed_data_check_config?: MlDelayedDataCheckConfig
frequency?: Duration
indices?: string[]
indexes?: string[]
indices: string[]
indices_options?: IndicesOptions
job_id?: Id
max_empty_searches?: integer
query?: QueryDslQueryContainer
query: QueryDslQueryContainer
query_delay?: Duration
runtime_mappings?: MappingRuntimeFields
script_fields?: Record<string, ScriptField>
@ -12217,7 +12144,7 @@ export interface MlDetector {
detector_index?: integer
exclude_frequent?: MlExcludeFrequent
field_name?: Field
function?: string
function: string
over_field_name?: Field
partition_field_name?: Field
use_null?: boolean
@ -12271,11 +12198,6 @@ export interface MlFilterRef {
export type MlFilterType = 'include' | 'exclude'
export interface MlGeoResults {
actual_point: string
typical_point: string
}
export interface MlHyperparameter {
absolute_importance?: double
name: Name
@ -12510,7 +12432,6 @@ export interface MlNerInferenceOptions {
tokenization?: MlTokenizationConfigContainer
results_field?: string
classification_labels?: string[]
vocabulary?: MlVocabulary
}
export interface MlNerInferenceUpdateOptions {
@ -12571,7 +12492,6 @@ export interface MlPage {
export interface MlPassThroughInferenceOptions {
tokenization?: MlTokenizationConfigContainer
results_field?: string
vocabulary?: MlVocabulary
}
export interface MlPassThroughInferenceUpdateOptions {
@ -12687,7 +12607,6 @@ export interface MlTotalFeatureImportanceStatistics {
export interface MlTrainedModelAssignment {
assignment_state: MlDeploymentAssignmentState
max_assigned_allocations?: integer
routing_table: Record<string, MlTrainedModelAssignmentRoutingTable>
start_time: DateTime
task_parameters: MlTrainedModelAssignmentTaskParameters
@ -12705,7 +12624,6 @@ export interface MlTrainedModelAssignmentTaskParameters {
model_id: Id
cache_size: ByteSize
number_of_allocations: integer
priority: MlTrainingPriority
queue_capacity: integer
threads_per_allocation: integer
}
@ -12764,7 +12682,6 @@ export interface MlTrainedModelDeploymentNodesStats {
export interface MlTrainedModelDeploymentStats {
allocation_status: MlTrainedModelDeploymentAllocationStatus
cache_size?: ByteSize
error_count: integer
inference_count: integer
model_id: Id
@ -12830,8 +12747,6 @@ export interface MlTrainedModelStats {
export type MlTrainedModelType = 'tree_ensemble' | 'lang_ident' | 'pytorch'
export type MlTrainingPriority = 'normal' | 'low'
export interface MlTransformAuthorization {
api_key?: MlApiKeyAuthorization
roles?: string[]
@ -12843,10 +12758,6 @@ export interface MlValidationLoss {
loss_type: string
}
export interface MlVocabulary {
index: IndexName
}
export interface MlZeroShotClassificationInferenceOptions {
tokenization?: MlTokenizationConfigContainer
hypothesis_template?: string
@ -12955,7 +12866,6 @@ export type MlDeleteForecastResponse = AcknowledgedResponseBase
export interface MlDeleteJobRequest extends RequestBase {
job_id: Id
force?: boolean
delete_user_annotations?: boolean
wait_for_completion?: boolean
}
@ -13530,7 +13440,6 @@ export interface MlOpenJobRequest extends RequestBase {
export interface MlOpenJobResponse {
opened: boolean
node: NodeId
}
export interface MlPostCalendarEventsRequest extends RequestBase {
@ -13593,8 +13502,6 @@ export interface MlPreviewDataFrameAnalyticsResponse {
export interface MlPreviewDatafeedRequest extends RequestBase {
datafeed_id?: Id
start?: DateTime
end?: DateTime
/** @deprecated The use of the 'body' key has been deprecated, move the nested keys to the top level object. */
body?: {
datafeed_config?: MlDatafeedConfig
@ -13691,16 +13598,16 @@ export interface MlPutDatafeedRequest extends RequestBase {
}
export interface MlPutDatafeedResponse {
aggregations?: Record<string, AggregationsAggregationContainer>
aggregations: Record<string, AggregationsAggregationContainer>
authorization?: MlDatafeedAuthorization
chunking_config: MlChunkingConfig
delayed_data_check_config?: MlDelayedDataCheckConfig
datafeed_id: Id
frequency?: Duration
frequency: Duration
indices: string[]
job_id: Id
indices_options?: IndicesOptions
max_empty_searches?: integer
max_empty_searches: integer
query: QueryDslQueryContainer
query_delay: Duration
runtime_mappings?: MappingRuntimeFields
@ -13818,7 +13725,7 @@ export interface MlPutTrainedModelRequest extends RequestBase {
definition?: MlPutTrainedModelDefinition
description?: string
inference_config: MlInferenceConfigCreateContainer
input?: MlPutTrainedModelInput
input: MlPutTrainedModelInput
metadata?: any
model_type?: MlTrainedModelType
model_size_bytes?: long
@ -13899,7 +13806,6 @@ export type MlPutTrainedModelVocabularyResponse = AcknowledgedResponseBase
export interface MlResetJobRequest extends RequestBase {
job_id: Id
wait_for_completion?: boolean
delete_user_annotations?: boolean
}
export type MlResetJobResponse = AcknowledgedResponseBase
@ -13953,7 +13859,6 @@ export interface MlStartTrainedModelDeploymentRequest extends RequestBase {
model_id: Id
cache_size?: ByteSize
number_of_allocations?: integer
priority?: MlTrainingPriority
queue_capacity?: integer
threads_per_allocation?: integer
timeout?: Duration
@ -14040,7 +13945,6 @@ export interface MlUpdateDatafeedRequest extends RequestBase {
indices?: string[]
indexes?: string[]
indices_options?: IndicesOptions
job_id?: Id
max_empty_searches?: integer
query?: QueryDslQueryContainer
query_delay?: Duration
@ -14052,15 +13956,15 @@ export interface MlUpdateDatafeedRequest extends RequestBase {
export interface MlUpdateDatafeedResponse {
authorization?: MlDatafeedAuthorization
aggregations?: Record<string, AggregationsAggregationContainer>
aggregations: Record<string, AggregationsAggregationContainer>
chunking_config: MlChunkingConfig
delayed_data_check_config?: MlDelayedDataCheckConfig
datafeed_id: Id
frequency?: Duration
frequency: Duration
indices: string[]
indices_options?: IndicesOptions
job_id: Id
max_empty_searches?: integer
max_empty_searches: integer
query: QueryDslQueryContainer
query_delay: Duration
runtime_mappings?: MappingRuntimeFields
@ -14095,7 +13999,6 @@ export interface MlUpdateJobRequest extends RequestBase {
categorization_filters?: string[]
description?: string
model_plot_config?: MlModelPlotConfig
model_prune_window?: Duration
daily_model_snapshot_retention_after_days?: long
model_snapshot_retention_days?: long
renormalization_window_days?: long
@ -14199,9 +14102,9 @@ export interface MonitoringBulkResponse {
export interface NodesAdaptiveSelection {
avg_queue_size?: long
avg_response_time?: Duration
avg_response_time?: long
avg_response_time_ns?: long
avg_service_time?: Duration
avg_service_time?: string
avg_service_time_ns?: long
outgoing_searches?: long
rank?: string
@ -14375,7 +14278,6 @@ export interface NodesIndexingPressure {
}
export interface NodesIndexingPressureMemory {
limit?: ByteSize
limit_in_bytes?: long
current?: NodesPressureMemory
total?: NodesPressureMemory
@ -14493,16 +14395,11 @@ export interface NodesPool {
}
export interface NodesPressureMemory {
all?: ByteSize
all_in_bytes?: long
combined_coordinating_and_primary?: ByteSize
combined_coordinating_and_primary_in_bytes?: long
coordinating?: ByteSize
coordinating_in_bytes?: long
primary?: ByteSize
primary_in_bytes?: long
replica?: ByteSize
replica_in_bytes?: long
all_in_bytes?: long
coordinating_rejections?: long
primary_rejections?: long
replica_rejections?: long
@ -14578,7 +14475,6 @@ export interface NodesScriptCache {
export interface NodesScripting {
cache_evictions?: long
compilations?: long
compilations_history?: Record<string, long>
compilation_limit_triggered?: long
contexts?: NodesContext[]
}
@ -15000,8 +14896,8 @@ export interface NodesInfoNodeJvmInfo {
vm_name: Name
vm_vendor: string
vm_version: VersionString
using_bundled_jdk: boolean
bundled_jdk: boolean
using_bundled_jdk: boolean
using_compressed_ordinary_object_pointers?: boolean | string
input_arguments: string[]
}
@ -15208,18 +15104,12 @@ export interface RollupGetRollupCapsRollupCapabilities {
}
export interface RollupGetRollupCapsRollupCapabilitySummary {
fields: Record<Field, RollupGetRollupCapsRollupFieldSummary[]>
fields: Record<Field, Record<string, any>>
index_pattern: string
job_id: string
rollup_index: string
}
export interface RollupGetRollupCapsRollupFieldSummary {
agg: string
calendar_interval?: Duration
time_zone?: TimeZone
}
export interface RollupGetRollupIndexCapsIndexCapabilities {
rollup_jobs: RollupGetRollupIndexCapsRollupJobSummary[]
}
@ -17198,7 +17088,6 @@ export interface TransformGetTransformStatsRequest extends RequestBase {
allow_no_match?: boolean
from?: long
size?: long
timeout?: Duration
}
export interface TransformGetTransformStatsResponse {
@ -17236,7 +17125,6 @@ export interface TransformGetTransformStatsTransformProgress {
export interface TransformGetTransformStatsTransformStats {
checkpointing: TransformGetTransformStatsCheckpointing
health?: TransformGetTransformStatsTransformStatsHealth
id: Id
node?: NodeAttributes
reason?: string
@ -17244,10 +17132,6 @@ export interface TransformGetTransformStatsTransformStats {
stats: TransformGetTransformStatsTransformIndexerStats
}
export interface TransformGetTransformStatsTransformStatsHealth {
status: HealthStatus
}
export interface TransformPreviewTransformRequest extends RequestBase {
transform_id?: Id
timeout?: Duration
@ -18243,10 +18127,6 @@ export interface XpackUsageFrozenIndices extends XpackUsageBase {
indices_count: long
}
export interface XpackUsageHealthStatistics extends XpackUsageBase {
invocations: XpackUsageInvocations
}
export interface XpackUsageIlm {
policy_count: integer
policy_stats: XpackUsageIlmPolicyStatistics[]
@ -18257,10 +18137,6 @@ export interface XpackUsageIlmPolicyStatistics {
phases: IlmPhases
}
export interface XpackUsageInvocations {
total: long
}
export interface XpackUsageIpFilter {
http: boolean
transport: boolean
@ -18353,7 +18229,6 @@ export interface XpackUsageMlInferenceTrainedModelsCount {
regression?: long
classification?: long
ner?: long
text_embedding?: long
}
export interface XpackUsageMlJobForecasts {
@ -18407,7 +18282,6 @@ export interface XpackUsageResponse {
flattened?: XpackUsageFlattened
frozen_indices: XpackUsageFrozenIndices
graph: XpackUsageBase
health_api?: XpackUsageHealthStatistics
ilm: XpackUsageIlm
logstash: XpackUsageBase
ml: XpackUsageMachineLearning

View File

@ -5,8 +5,8 @@
Yes.
## Background
Elasticsearch offers its entire API via HTTP REST endpoints. You can find the whole API specification for every version [here](https://github.com/elastic/elasticsearch/tree/main/rest-api-spec/src/main/resources/rest-api-spec/api).<br/>
To support different languages at the same time, the Elasticsearch team decided to provide a [YAML specification](https://github.com/elastic/elasticsearch/tree/main/rest-api-spec/src/main/resources/rest-api-spec/test) to test every endpoint, body, headers, warning, error and so on.<br/>
Elasticsearch offers its entire API via HTTP REST endpoints. You can find the whole API specification for every version [here](https://github.com/elastic/elasticsearch/tree/master/rest-api-spec/src/main/resources/rest-api-spec/api).<br/>
To support different languages at the same time, the Elasticsearch team decided to provide a [YAML specification](https://github.com/elastic/elasticsearch/tree/master/rest-api-spec/src/main/resources/rest-api-spec/test) to test every endpoint, body, headers, warning, error and so on.<br/>
This testing suite uses that specification to generate the test for the specified version of Elasticsearch on the fly.
## Run
@ -20,45 +20,20 @@ Once the Elasticsearch repository has been cloned, the testing suite will connec
The specification does not allow the test to be run in parallel, so it might take a while to run the entire testing suite; on my machine, `MacBookPro15,2 core i7 2.7GHz 16GB of RAM` it takes around four minutes.
### Running locally
If you want to run the integration tests on your development machine, you must have an Elasticsearch instance running first.
A local instance can be spun up in a Docker container by running the [`.ci/run-elasticsearch.sh`](/.ci/run-elasticsearch.sh) script.
This is the same script CI jobs use to run Elasticsearch for integration tests, so your results should be relatively consistent.
To simplify the process of starting a container, testing, and cleaning up the container, you can run the `make integration` target:
```sh
# set some parameters
export STACK_VERSION=8.7.0
export TEST_SUITE=free # can be `free` or `platinum`
make integration
```
If Elasticsearch doesn't come up, run `make integration-cleanup` and then `DETACH=false .ci/run-elasticsearch.sh` manually to read the startup logs.
If you get an error about `vm.max_map_count` being too low, run `sudo sysctl -w vm.max_map_count=262144` to update the setting until the next reboot, or `sudo sysctl -w vm.max_map_count=262144; echo 'vm.max_map_count=262144' | sudo tee -a /etc/sysctl.conf` to update the setting permanently.
### Exit on the first failure
By default the suite will run all the tests, even if one assertion has failed. If you want to stop the test at the first failure, use the bailout option:
Bu default the suite will run all the test, even if one assertion has failed. If you want to stop the test at the first failure, use the bailout option:
```sh
npm run test:integration -- --bail
```
### Calculate the code coverage
If you want to calculate the code coverage just run the testing suite with the following parameters, once the test ends, it will open a browser window with the results.
```sh
npm run test:integration -- --cov --coverage-report=html
```
## How does this thing work?
At first sight, it might seem complicated, but once you understand what the moving parts are, it's quite easy.
1. Connects to the given Elasticsearch instance
1. Gets the ES version and build hash
1. Checkout to the given hash (and clone the repository if it is not present)
@ -71,4 +46,7 @@ At first sight, it might seem complicated, but once you understand what the movi
Inside the `index.js` file, you will find the connection, cloning, reading and parsing part of the test, while inside the `test-runner.js` file you will find the function to handle the assertions. Inside `test-runner.js`, we use a [queue](https://github.com/delvedor/workq) to be sure that everything is run in the correct order.
Check out the [rest-api-spec readme](https://github.com/elastic/elasticsearch/blob/main/rest-api-spec/src/main/resources/rest-api-spec/test/README.asciidoc) if you want to know more about how the assertions work.
Checkout the [rest-api-spec readme](https://github.com/elastic/elasticsearch/blob/master/rest-api-spec/src/main/resources/rest-api-spec/test/README.asciidoc) if you want to know more about how the assertions work.
#### Why are we running the test with the `--harmony` flag?
Because on Node v6 the regex lookbehinds are not supported.

View File

@ -27,9 +27,9 @@ process.on('unhandledRejection', function (err) {
const { writeFileSync, readFileSync, readdirSync, statSync } = require('fs')
const { join, sep } = require('path')
const yaml = require('js-yaml')
const minimist = require('minimist')
const ms = require('ms')
const { Client } = require('../../index')
const { kProductCheck } = require('@elastic/transport/lib/symbols')
const build = require('./test-runner')
const { sleep } = require('./helper')
const createJunitReporter = require('./reporter')
@ -42,21 +42,12 @@ const MAX_API_TIME = 1000 * 90
const MAX_FILE_TIME = 1000 * 30
const MAX_TEST_TIME = 1000 * 3
const options = minimist(process.argv.slice(2), {
boolean: ['bail'],
string: ['suite', 'test'],
})
const freeSkips = {
// not supported yet
'/free/cluster.desired_nodes/10_basic.yml': ['*'],
// Cannot find methods on `Internal` object
'/free/cluster.desired_balance/10_basic.yml': ['*'],
'/free/cluster.desired_nodes/20_dry_run.yml': ['*'],
'/free/cluster.prevalidate_node_removal/10_basic.yml': ['*'],
// the v8 client never sends the scroll_id in querystring,
'/free/health/30_feature.yml': ['*'],
'/free/health/40_useractions.yml': ['*'],
// the v8 client never sends the scroll_id in querystgring,
// the way the test is structured causes a security exception
'free/scroll/10_basic.yml': ['Body params override query string'],
'free/scroll/11_clear.yml': [
@ -65,74 +56,80 @@ const freeSkips = {
],
'free/cat.allocation/10_basic.yml': ['*'],
'free/cat.snapshots/10_basic.yml': ['Test cat snapshots output'],
// TODO: remove this once 'arbitrary_key' is implemented
// https://github.com/elastic/elasticsearch/pull/41492
'indices.split/30_copy_settings.yml': ['*'],
'indices.stats/50_disk_usage.yml': ['Disk usage stats'],
'indices.stats/60_field_usage.yml': ['Field usage stats'],
// skipping because we are booting ES with `discovery.type=single-node`
// and this test will fail because of this configuration
'nodes.stats/30_discovery.yml': ['*'],
// the expected error is returning a 503,
// which triggers a retry and the node to be marked as dead
'search.aggregation/240_max_buckets.yml': ['*'],
// long values and json do not play nicely together
'search.aggregation/40_range.yml': ['Min and max long range bounds'],
// the yaml runner assumes that null means "does not exists",
// while null is a valid json value, so the check will fail
'search/320_disallow_queries.yml': ['Test disallow expensive queries'],
'free/tsdb/90_unsupported_operations.yml': ['noop update'],
'free/tsdb/90_unsupported_operations.yml': ['noop update']
}
const platinumDenyList = {
const platinumBlackList = {
'api_key/10_basic.yml': ['Test get api key'],
'api_key/20_query.yml': ['*'],
'api_key/11_invalidation.yml': ['Test invalidate api key by realm name'],
'analytics/histogram.yml': ['Histogram requires values in increasing order'],
// this two test cases are broken, we should
// return on those in the future.
'analytics/top_metrics.yml': [
'sort by keyword field fails',
'sort by string script fails'
],
'cat.aliases/10_basic.yml': ['Empty cluster'],
'index/10_with_id.yml': ['Index with ID'],
'indices.get_alias/10_basic.yml': ['Get alias against closed indices'],
'indices.get_alias/20_empty.yml': ['Check empty aliases when getting all aliases via /_alias'],
'text_structure/find_structure.yml': ['*'],
// https://github.com/elastic/elasticsearch/pull/39400
'ml/jobs_crud.yml': ['Test put job with id that is already taken'],
// object keys must me strings, and `0.0.toString()` is `0`
'ml/evaluate_data_frame.yml': [
'Test binary_soft_classifition precision',
'Test binary_soft_classifition recall',
'Test binary_soft_classifition confusion_matrix'
],
// it gets random failures on CI, must investigate
'ml/set_upgrade_mode.yml': [
'Attempt to open job when upgrade_mode is enabled',
'Setting upgrade mode to disabled from enabled'
],
// The cleanup fails with a index not found when retrieving the jobs
'ml/get_datafeed_stats.yml': ['Test get datafeed stats when total_search_time_ms mapping is missing'],
'ml/bucket_correlation_agg.yml': ['Test correlation bucket agg simple'],
// start should be a string
'ml/jobs_get_result_overall_buckets.yml': ['Test overall buckets given epoch start and end params'],
// this can't happen with the client
'ml/start_data_frame_analytics.yml': ['Test start with inconsistent body/param ids'],
'ml/stop_data_frame_analytics.yml': ['Test stop with inconsistent body/param ids'],
'ml/preview_datafeed.yml': ['*'],
// Investigate why is failing
'ml/inference_crud.yml': ['*'],
'ml/categorization_agg.yml': ['Test categorization aggregation with poor settings'],
'ml/filter_crud.yml': ['*'],
// investigate why this is failing
'monitoring/bulk/10_basic.yml': ['*'],
'monitoring/bulk/20_privileges.yml': ['*'],
'license/20_put_license.yml': ['*'],
'snapshot/10_basic.yml': ['*'],
'snapshot/20_operator_privileges_disabled.yml': ['*'],
// the body is correct, but the regex is failing
'sql/sql.yml': ['Getting textual representation'],
'searchable_snapshots/10_usage.yml': ['*'],
'service_accounts/10_basic.yml': ['*'],
// we are setting two certificates in the docker config
'ssl/10_basic.yml': ['*'],
'token/10_basic.yml': ['*'],
'token/11_invalidation.yml': ['*'],
// very likely, the index template has not been loaded yet.
// we should run a indices.existsTemplate, but the name of the
// template may vary during time.
@ -150,20 +147,16 @@ const platinumDenyList = {
'transforms_stats.yml': ['*'],
'transforms_stats_continuous.yml': ['*'],
'transforms_update.yml': ['*'],
// js does not support ulongs
'unsigned_long/10_basic.yml': ['*'],
'unsigned_long/20_null_value.yml': ['*'],
'unsigned_long/30_multi_fields.yml': ['*'],
'unsigned_long/40_different_numeric.yml': ['*'],
'unsigned_long/50_script_values.yml': ['*'],
// the v8 client flattens the body into the parent object
'platinum/users/10_basic.yml': ['Test put user with different username in body'],
// docker issue?
'watcher/execute_watch/60_http_input.yml': ['*'],
// the checks are correct, but for some reason the test is failing on js side
// I bet is because the backslashes in the rg
'watcher/execute_watch/70_invalid.yml': ['*'],
@ -177,9 +170,8 @@ const platinumDenyList = {
'platinum/ml/delete_job_force.yml': ['Test force delete an open job that is referred by a started datafeed'],
'platinum/ml/evaluate_data_frame.yml': ['*'],
'platinum/ml/get_datafeed_stats.yml': ['*'],
// start should be a string in the yaml test
'platinum/ml/start_stop_datafeed.yml': ['*'],
'platinum/ml/start_stop_datafeed.yml': ['*']
}
function runner (opts = {}) {
@ -191,6 +183,8 @@ function runner (opts = {}) {
}
}
const client = new Client(options)
// TODO: remove the following line once https://github.com/elastic/elasticsearch/issues/82358 is fixed
client.transport[kProductCheck] = null
log('Loading yaml suite')
start({ client, isXPack: opts.isXPack })
.catch(err => {
@ -295,21 +289,13 @@ async function start ({ client, isXPack }) {
}
const cleanPath = file.slice(file.lastIndexOf(apiName))
// skip if --suite CLI arg doesn't match
if (options.suite && !cleanPath.endsWith(options.suite)) continue
log(' ' + cleanPath)
const junitTestSuite = junitTestSuites.testsuite(apiName.slice(1) + ' - ' + cleanPath)
for (const test of tests) {
const testTime = now()
const name = Object.keys(test)[0]
// skip setups, teardowns and anything that doesn't match --test flag when present
if (name === 'setup' || name === 'teardown') continue
if (options.test && !name.endsWith(options.test)) continue
const junitTestCase = junitTestSuite.testcase(name)
stats.total += 1
@ -330,12 +316,7 @@ async function start ({ client, isXPack }) {
junitTestSuites.end()
generateJunitXmlReport(junit, isXPack ? 'platinum' : 'free')
console.error(err)
if (options.bail) {
process.exit(1)
} else {
continue
}
process.exit(1)
}
const totalTestTime = now() - testTime
junitTestCase.end()
@ -399,8 +380,7 @@ function generateJunitXmlReport (junit, suite) {
}
if (require.main === module) {
const scheme = process.env.TEST_SUITE === 'platinum' ? 'https' : 'http'
const node = process.env.TEST_ES_SERVER || `${scheme}://elastic:changeme@localhost:9200`
const node = process.env.TEST_ES_SERVER || 'http://elastic:changeme@localhost:9200'
const opts = {
node,
isXPack: process.env.TEST_SUITE !== 'free'
@ -409,28 +389,26 @@ if (require.main === module) {
}
const shouldSkip = (isXPack, file, name) => {
if (options.suite || options.test) return false
let list = Object.keys(freeSkips)
for (let i = 0; i < list.length; i++) {
const freeTest = freeSkips[list[i]]
for (let j = 0; j < freeTest.length; j++) {
if (file.endsWith(list[i]) && (name === freeTest[j] || freeTest[j] === '*')) {
const testName = file.slice(file.indexOf(`${sep}elasticsearch${sep}`)) + ' / ' + name
log(`Skipping test ${testName} because it is denylisted in the free test suite`)
log(`Skipping test ${testName} because is blacklisted in the free test`)
return true
}
}
}
if (file.includes('x-pack') || isXPack) {
list = Object.keys(platinumDenyList)
list = Object.keys(platinumBlackList)
for (let i = 0; i < list.length; i++) {
const platTest = platinumDenyList[list[i]]
const platTest = platinumBlackList[list[i]]
for (let j = 0; j < platTest.length; j++) {
if (file.endsWith(list[i]) && (name === platTest[j] || platTest[j] === '*')) {
const testName = file.slice(file.indexOf(`${sep}elasticsearch${sep}`)) + ' / ' + name
log(`Skipping test ${testName} because it is denylisted in the platinum test suite`)
log(`Skipping test ${testName} because is blacklisted in the platinum test`)
return true
}
}