@elastic/elasticsearch 9.2.0 → 9.3.0-unstable.20251023172619
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api/indices.d.ts +21 -0
- package/lib/api/api/indices.js +129 -0
- package/lib/api/api/indices.js.map +1 -1
- package/lib/api/api/inference.d.ts +10 -3
- package/lib/api/api/inference.js +74 -0
- package/lib/api/api/inference.js.map +1 -1
- package/lib/api/api/ml.d.ts +1 -1
- package/lib/api/api/profiling.d.ts +4 -4
- package/lib/api/api/project.d.ts +2 -1
- package/lib/api/api/project.js.map +1 -1
- package/lib/api/api/reindex.js +0 -2
- package/lib/api/api/reindex.js.map +1 -1
- package/lib/api/api/security.d.ts +4 -4
- package/lib/api/api/security.js +9 -4
- package/lib/api/api/security.js.map +1 -1
- package/lib/api/api/transform.d.ts +1 -1
- package/lib/api/types.d.ts +278 -32
- package/lib/client.d.ts +3 -3
- package/lib/client.js +1 -1
- package/package.json +1 -1
package/lib/api/api/indices.d.ts
CHANGED
|
@@ -290,6 +290,20 @@ export default class Indices {
|
|
|
290
290
|
getMigrateReindexStatus(this: That, params: T.IndicesGetMigrateReindexStatusRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IndicesGetMigrateReindexStatusResponse>;
|
|
291
291
|
getMigrateReindexStatus(this: That, params: T.IndicesGetMigrateReindexStatusRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IndicesGetMigrateReindexStatusResponse, unknown>>;
|
|
292
292
|
getMigrateReindexStatus(this: That, params: T.IndicesGetMigrateReindexStatusRequest, options?: TransportRequestOptions): Promise<T.IndicesGetMigrateReindexStatusResponse>;
|
|
293
|
+
/**
|
|
294
|
+
* Get random sample of ingested data
|
|
295
|
+
* @see {@link https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-sample | Elasticsearch API documentation}
|
|
296
|
+
*/
|
|
297
|
+
getSample(this: That, params?: T.TODO, options?: TransportRequestOptionsWithOutMeta): Promise<T.TODO>;
|
|
298
|
+
getSample(this: That, params?: T.TODO, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.TODO, unknown>>;
|
|
299
|
+
getSample(this: That, params?: T.TODO, options?: TransportRequestOptions): Promise<T.TODO>;
|
|
300
|
+
/**
|
|
301
|
+
* Get stats about a random sample of ingested data
|
|
302
|
+
* @see {@link https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-sample | Elasticsearch API documentation}
|
|
303
|
+
*/
|
|
304
|
+
getSampleStats(this: That, params?: T.TODO, options?: TransportRequestOptionsWithOutMeta): Promise<T.TODO>;
|
|
305
|
+
getSampleStats(this: That, params?: T.TODO, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.TODO, unknown>>;
|
|
306
|
+
getSampleStats(this: That, params?: T.TODO, options?: TransportRequestOptions): Promise<T.TODO>;
|
|
293
307
|
/**
|
|
294
308
|
* Get index settings. Get setting information for one or more indices. For data streams, it returns setting information for the stream's backing indices.
|
|
295
309
|
* @see {@link https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-get-settings | Elasticsearch API documentation}
|
|
@@ -388,6 +402,13 @@ export default class Indices {
|
|
|
388
402
|
putMapping(this: That, params: T.IndicesPutMappingRequest, options?: TransportRequestOptionsWithOutMeta): Promise<T.IndicesPutMappingResponse>;
|
|
389
403
|
putMapping(this: That, params: T.IndicesPutMappingRequest, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.IndicesPutMappingResponse, unknown>>;
|
|
390
404
|
putMapping(this: That, params: T.IndicesPutMappingRequest, options?: TransportRequestOptions): Promise<T.IndicesPutMappingResponse>;
|
|
405
|
+
/**
|
|
406
|
+
* Configure sampling for an index or data stream
|
|
407
|
+
* @see {@link https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-sample-configuration | Elasticsearch API documentation}
|
|
408
|
+
*/
|
|
409
|
+
putSampleConfiguration(this: That, params?: T.TODO, options?: TransportRequestOptionsWithOutMeta): Promise<T.TODO>;
|
|
410
|
+
putSampleConfiguration(this: That, params?: T.TODO, options?: TransportRequestOptionsWithMeta): Promise<TransportResult<T.TODO, unknown>>;
|
|
411
|
+
putSampleConfiguration(this: That, params?: T.TODO, options?: TransportRequestOptions): Promise<T.TODO>;
|
|
391
412
|
/**
|
|
392
413
|
* Update index settings. Changes dynamic index settings in real time. For data streams, index setting changes are applied to all backing indices by default. To revert a setting to the default value, use a null value. The list of per-index settings that can be updated dynamically on live indices can be found in index settings documentation. To preserve existing settings from being updated, set the `preserve_existing` parameter to `true`. For performance optimization during bulk indexing, you can disable the refresh interval. Refer to [disable refresh interval](https://www.elastic.co/docs/deploy-manage/production-guidance/optimize-performance/indexing-speed#disable-refresh-interval) for an example. There are multiple valid ways to represent index settings in the request body. You can specify only the setting, for example: ``` { "number_of_replicas": 1 } ``` Or you can use an `index` setting object: ``` { "index": { "number_of_replicas": 1 } } ``` Or you can use dot annotation: ``` { "index.number_of_replicas": 1 } ``` Or you can embed any of the aforementioned options in a `settings` object. For example: ``` { "settings": { "index": { "number_of_replicas": 1 } } } ``` NOTE: You can only define new analyzers on closed indices. To add an analyzer, you must close the index, define the analyzer, and reopen the index. You cannot close the write index of a data stream. To update the analyzer for a data stream's write index and future backing indices, update the analyzer in the index template used by the stream. Then roll over the data stream to apply the new analyzer to the stream's write index and future backing indices. This affects searches and any new data added to the stream after the rollover. However, it does not affect the data stream's backing indices or their existing data. To change the analyzer for existing backing indices, you must create a new data stream and reindex your data into it. Refer to [updating analyzers on existing indices](https://www.elastic.co/docs/manage-data/data-store/text-analysis/specify-an-analyzer#update-analyzers-on-existing-indices) for step-by-step examples.
|
|
393
414
|
* @see {@link https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-indices-put-settings | Elasticsearch API documentation}
|
package/lib/api/api/indices.js
CHANGED
|
@@ -480,6 +480,20 @@ class Indices {
|
|
|
480
480
|
body: [],
|
|
481
481
|
query: []
|
|
482
482
|
},
|
|
483
|
+
'indices.get_sample': {
|
|
484
|
+
path: [
|
|
485
|
+
'index'
|
|
486
|
+
],
|
|
487
|
+
body: [],
|
|
488
|
+
query: []
|
|
489
|
+
},
|
|
490
|
+
'indices.get_sample_stats': {
|
|
491
|
+
path: [
|
|
492
|
+
'index'
|
|
493
|
+
],
|
|
494
|
+
body: [],
|
|
495
|
+
query: []
|
|
496
|
+
},
|
|
483
497
|
'indices.get_settings': {
|
|
484
498
|
path: [
|
|
485
499
|
'index',
|
|
@@ -673,6 +687,13 @@ class Indices {
|
|
|
673
687
|
'write_index_only'
|
|
674
688
|
]
|
|
675
689
|
},
|
|
690
|
+
'indices.put_sample_configuration': {
|
|
691
|
+
path: [
|
|
692
|
+
'index'
|
|
693
|
+
],
|
|
694
|
+
body: [],
|
|
695
|
+
query: []
|
|
696
|
+
},
|
|
676
697
|
'indices.put_settings': {
|
|
677
698
|
path: [
|
|
678
699
|
'index'
|
|
@@ -2657,6 +2678,78 @@ class Indices {
|
|
|
2657
2678
|
};
|
|
2658
2679
|
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
2659
2680
|
}
|
|
2681
|
+
async getSample(params, options) {
|
|
2682
|
+
const { path: acceptedPath } = this[client_1.kAcceptedParams]['indices.get_sample'];
|
|
2683
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
2684
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
2685
|
+
let body;
|
|
2686
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
2687
|
+
if (userBody != null) {
|
|
2688
|
+
if (typeof userBody === 'string') {
|
|
2689
|
+
body = userBody;
|
|
2690
|
+
}
|
|
2691
|
+
else {
|
|
2692
|
+
body = { ...userBody };
|
|
2693
|
+
}
|
|
2694
|
+
}
|
|
2695
|
+
params = params !== null && params !== void 0 ? params : {};
|
|
2696
|
+
for (const key in params) {
|
|
2697
|
+
if (acceptedPath.includes(key)) {
|
|
2698
|
+
continue;
|
|
2699
|
+
}
|
|
2700
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
2701
|
+
querystring[key] = params[key];
|
|
2702
|
+
}
|
|
2703
|
+
}
|
|
2704
|
+
const method = 'GET';
|
|
2705
|
+
const path = `/${encodeURIComponent(params.index.toString())}/_sample`;
|
|
2706
|
+
const meta = {
|
|
2707
|
+
name: 'indices.get_sample',
|
|
2708
|
+
pathParts: {
|
|
2709
|
+
index: params.index
|
|
2710
|
+
},
|
|
2711
|
+
acceptedParams: [
|
|
2712
|
+
'index'
|
|
2713
|
+
]
|
|
2714
|
+
};
|
|
2715
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
2716
|
+
}
|
|
2717
|
+
async getSampleStats(params, options) {
|
|
2718
|
+
const { path: acceptedPath } = this[client_1.kAcceptedParams]['indices.get_sample_stats'];
|
|
2719
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
2720
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
2721
|
+
let body;
|
|
2722
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
2723
|
+
if (userBody != null) {
|
|
2724
|
+
if (typeof userBody === 'string') {
|
|
2725
|
+
body = userBody;
|
|
2726
|
+
}
|
|
2727
|
+
else {
|
|
2728
|
+
body = { ...userBody };
|
|
2729
|
+
}
|
|
2730
|
+
}
|
|
2731
|
+
params = params !== null && params !== void 0 ? params : {};
|
|
2732
|
+
for (const key in params) {
|
|
2733
|
+
if (acceptedPath.includes(key)) {
|
|
2734
|
+
continue;
|
|
2735
|
+
}
|
|
2736
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
2737
|
+
querystring[key] = params[key];
|
|
2738
|
+
}
|
|
2739
|
+
}
|
|
2740
|
+
const method = 'GET';
|
|
2741
|
+
const path = `/${encodeURIComponent(params.index.toString())}/_sample/stats`;
|
|
2742
|
+
const meta = {
|
|
2743
|
+
name: 'indices.get_sample_stats',
|
|
2744
|
+
pathParts: {
|
|
2745
|
+
index: params.index
|
|
2746
|
+
},
|
|
2747
|
+
acceptedParams: [
|
|
2748
|
+
'index'
|
|
2749
|
+
]
|
|
2750
|
+
};
|
|
2751
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
2752
|
+
}
|
|
2660
2753
|
async getSettings(params, options) {
|
|
2661
2754
|
const { path: acceptedPath } = this[client_1.kAcceptedParams]['indices.get_settings'];
|
|
2662
2755
|
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
@@ -3348,6 +3441,42 @@ class Indices {
|
|
|
3348
3441
|
};
|
|
3349
3442
|
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
3350
3443
|
}
|
|
3444
|
+
async putSampleConfiguration(params, options) {
|
|
3445
|
+
const { path: acceptedPath } = this[client_1.kAcceptedParams]['indices.put_sample_configuration'];
|
|
3446
|
+
const userQuery = params === null || params === void 0 ? void 0 : params.querystring;
|
|
3447
|
+
const querystring = userQuery != null ? { ...userQuery } : {};
|
|
3448
|
+
let body;
|
|
3449
|
+
const userBody = params === null || params === void 0 ? void 0 : params.body;
|
|
3450
|
+
if (userBody != null) {
|
|
3451
|
+
if (typeof userBody === 'string') {
|
|
3452
|
+
body = userBody;
|
|
3453
|
+
}
|
|
3454
|
+
else {
|
|
3455
|
+
body = { ...userBody };
|
|
3456
|
+
}
|
|
3457
|
+
}
|
|
3458
|
+
params = params !== null && params !== void 0 ? params : {};
|
|
3459
|
+
for (const key in params) {
|
|
3460
|
+
if (acceptedPath.includes(key)) {
|
|
3461
|
+
continue;
|
|
3462
|
+
}
|
|
3463
|
+
else if (key !== 'body' && key !== 'querystring') {
|
|
3464
|
+
querystring[key] = params[key];
|
|
3465
|
+
}
|
|
3466
|
+
}
|
|
3467
|
+
const method = 'PUT';
|
|
3468
|
+
const path = `/${encodeURIComponent(params.index.toString())}/_sample/config`;
|
|
3469
|
+
const meta = {
|
|
3470
|
+
name: 'indices.put_sample_configuration',
|
|
3471
|
+
pathParts: {
|
|
3472
|
+
index: params.index
|
|
3473
|
+
},
|
|
3474
|
+
acceptedParams: [
|
|
3475
|
+
'index'
|
|
3476
|
+
]
|
|
3477
|
+
};
|
|
3478
|
+
return await this.transport.request({ path, method, querystring, body, meta }, options);
|
|
3479
|
+
}
|
|
3351
3480
|
async putSettings(params, options) {
|
|
3352
3481
|
var _b;
|
|
3353
3482
|
const { path: acceptedPath, body: acceptedBody, query: acceptedQuery } = this[client_1.kAcceptedParams]['indices.put_settings'];
|