@elastic/elasticsearch 9.3.1 → 9.3.2

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.
@@ -26,8 +26,8 @@ export interface BulkOperationBase {
26
26
  _id?: Id;
27
27
  /** The name of the index or index alias to perform the action on. */
28
28
  _index?: IndexName;
29
- /** A custom value used to route operations to a specific shard. */
30
- routing?: Routing;
29
+ /** A custom value used to route operations to a specific shard, or multiple comma separated values. */
30
+ routing?: string;
31
31
  if_primary_term?: long;
32
32
  if_seq_no?: SequenceNumber;
33
33
  version?: VersionNumber;
@@ -2426,7 +2426,7 @@ export interface ReindexDestination {
2426
2426
  * If it is `keep`, the routing on the bulk request sent for each match is set to the routing on the match.
2427
2427
  * If it is `discard`, the routing on the bulk request sent for each match is set to `null`.
2428
2428
  * If it is `=value`, the routing on the bulk request sent for each match is set to all value specified after the equals sign (`=`). */
2429
- routing?: Routing;
2429
+ routing?: string;
2430
2430
  /** The versioning to use for the indexing operation. */
2431
2431
  version_type?: VersionType;
2432
2432
  }
@@ -3253,7 +3253,7 @@ export interface SearchCompletionSuggestOption<TDocument = unknown> {
3253
3253
  fields?: Record<string, any>;
3254
3254
  _id?: string;
3255
3255
  _index?: IndexName;
3256
- _routing?: Routing;
3256
+ _routing?: string;
3257
3257
  _score?: double;
3258
3258
  _source?: TDocument;
3259
3259
  text: string;
@@ -7128,13 +7128,20 @@ export interface AggregationsMultiBucketAggregateBase<TBucket = unknown> extends
7128
7128
  export interface AggregationsMultiBucketBase {
7129
7129
  doc_count: long;
7130
7130
  }
7131
- export interface AggregationsMultiTermLookup {
7132
- /** A fields from which to retrieve terms. */
7133
- field: Field;
7131
+ interface AggregationsMultiTermLookupCommonProps {
7134
7132
  /** The value to apply to documents that do not have a value.
7135
7133
  * By default, documents without a value are ignored. */
7136
7134
  missing?: AggregationsMissing;
7137
7135
  }
7136
+ interface AggregationsMultiTermLookupExclusiveProps {
7137
+ /** A field from which to retrieve terms.
7138
+ * It is required if `script` is not provided. */
7139
+ field?: Field;
7140
+ /** A script to calculate terms to aggregate on.
7141
+ * It is required if `field` is not provided. */
7142
+ script?: Script | ScriptSource;
7143
+ }
7144
+ export type AggregationsMultiTermLookup = AggregationsMultiTermLookupCommonProps & ExactlyOne<AggregationsMultiTermLookupExclusiveProps>;
7138
7145
  export interface AggregationsMultiTermsAggregate extends AggregationsTermsAggregateBase<AggregationsMultiTermsBucket> {
7139
7146
  }
7140
7147
  export interface AggregationsMultiTermsAggregation extends AggregationsBucketAggregationBase {
@@ -9570,7 +9577,7 @@ export interface QueryDslFieldLookup {
9570
9577
  /** Name of the field. */
9571
9578
  path?: Field;
9572
9579
  /** Custom routing value. */
9573
- routing?: Routing;
9580
+ routing?: string;
9574
9581
  }
9575
9582
  export type QueryDslFieldValueFactorModifier = 'none' | 'log' | 'log1p' | 'log2p' | 'ln' | 'ln1p' | 'ln2p' | 'square' | 'sqrt' | 'reciprocal';
9576
9583
  export interface QueryDslFieldValueFactorScoreFunction {
@@ -10016,7 +10023,7 @@ export interface QueryDslMoreLikeThisQuery extends QueryDslQueryBase {
10016
10023
  min_term_freq?: integer;
10017
10024
  /** The minimum word length below which the terms are ignored. */
10018
10025
  min_word_length?: integer;
10019
- routing?: Routing;
10026
+ routing?: string;
10020
10027
  /** An array of stop words.
10021
10028
  * Any word in this set is ignored. */
10022
10029
  stop_words?: AnalysisStopWords;
@@ -10107,7 +10114,7 @@ export interface QueryDslPercolateQuery extends QueryDslQueryBase {
10107
10114
  /** Preference used to fetch document to percolate. */
10108
10115
  preference?: string;
10109
10116
  /** Routing used to fetch document to percolate. */
10110
- routing?: Routing;
10117
+ routing?: string;
10111
10118
  /** The expected version of a stored document to percolate. */
10112
10119
  version?: VersionNumber;
10113
10120
  }
@@ -10603,7 +10610,7 @@ export interface QueryDslTermsLookup {
10603
10610
  index: IndexName;
10604
10611
  id: Id;
10605
10612
  path: Field;
10606
- routing?: Routing;
10613
+ routing?: string;
10607
10614
  }
10608
10615
  export interface QueryDslTermsQueryKeys extends QueryDslQueryBase {
10609
10616
  }
@@ -20271,6 +20278,15 @@ export interface EsqlAsyncQueryRequest extends RequestBase {
20271
20278
  /** Indicates whether the query and its results are stored in the cluster.
20272
20279
  * If false, the query and its results are stored in the cluster only if the request does not complete during the period set by the `wait_for_completion_timeout` parameter. */
20273
20280
  keep_on_completion?: boolean;
20281
+ /** Specifies a subset of projects to target using project
20282
+ * metadata tags in a subset of Lucene query syntax.
20283
+ * Allowed Lucene queries: the _alias tag and a single value (possibly wildcarded).
20284
+ * Examples:
20285
+ * _alias:my-project
20286
+ * _alias:_origin
20287
+ * _alias:*pr*
20288
+ * Supported in serverless only. */
20289
+ project_routing?: ProjectRouting;
20274
20290
  /** All values in `body` will be added to the request body. */
20275
20291
  body?: string | ({
20276
20292
  [key: string]: any;
@@ -20291,6 +20307,7 @@ export interface EsqlAsyncQueryRequest extends RequestBase {
20291
20307
  wait_for_completion_timeout?: never;
20292
20308
  keep_alive?: never;
20293
20309
  keep_on_completion?: never;
20310
+ project_routing?: never;
20294
20311
  });
20295
20312
  /** All values in `querystring` will be added to the request querystring. */
20296
20313
  querystring?: {
@@ -20312,6 +20329,7 @@ export interface EsqlAsyncQueryRequest extends RequestBase {
20312
20329
  wait_for_completion_timeout?: never;
20313
20330
  keep_alive?: never;
20314
20331
  keep_on_completion?: never;
20332
+ project_routing?: never;
20315
20333
  };
20316
20334
  }
20317
20335
  export type EsqlAsyncQueryResponse = EsqlAsyncEsqlResult;
@@ -20541,6 +20559,15 @@ export interface EsqlQueryRequest extends RequestBase {
20541
20559
  * count.
20542
20560
  * This is similar to `include_ccs_metadata`, but it also returns metadata when the query is not CCS/CPS */
20543
20561
  include_execution_metadata?: boolean;
20562
+ /** Specifies a subset of projects to target using project
20563
+ * metadata tags in a subset of Lucene query syntax.
20564
+ * Allowed Lucene queries: the _alias tag and a single value (possibly wildcarded).
20565
+ * Examples:
20566
+ * _alias:my-project
20567
+ * _alias:_origin
20568
+ * _alias:*pr*
20569
+ * Supported in serverless only. */
20570
+ project_routing?: ProjectRouting;
20544
20571
  /** All values in `body` will be added to the request body. */
20545
20572
  body?: string | ({
20546
20573
  [key: string]: any;
@@ -20558,6 +20585,7 @@ export interface EsqlQueryRequest extends RequestBase {
20558
20585
  tables?: never;
20559
20586
  include_ccs_metadata?: never;
20560
20587
  include_execution_metadata?: never;
20588
+ project_routing?: never;
20561
20589
  });
20562
20590
  /** All values in `querystring` will be added to the request querystring. */
20563
20591
  querystring?: {
@@ -20576,6 +20604,7 @@ export interface EsqlQueryRequest extends RequestBase {
20576
20604
  tables?: never;
20577
20605
  include_ccs_metadata?: never;
20578
20606
  include_execution_metadata?: never;
20607
+ project_routing?: never;
20579
20608
  };
20580
20609
  }
20581
20610
  export type EsqlQueryResponse = EsqlEsqlResult;
@@ -21598,17 +21627,17 @@ export interface IndicesAlias {
21598
21627
  filter?: QueryDslQueryContainer;
21599
21628
  /** Value used to route indexing operations to a specific shard.
21600
21629
  * If specified, this overwrites the `routing` value for indexing operations. */
21601
- index_routing?: Routing;
21630
+ index_routing?: string;
21602
21631
  /** If `true`, the alias is hidden.
21603
21632
  * All indices for the alias must have the same `is_hidden` value. */
21604
21633
  is_hidden?: boolean;
21605
21634
  /** If `true`, the index is the write index for the alias. */
21606
21635
  is_write_index?: boolean;
21607
21636
  /** Value used to route indexing and search operations to a specific shard. */
21608
- routing?: Routing;
21637
+ routing?: string;
21609
21638
  /** Value used to route search operations to a specific shard.
21610
21639
  * If specified, this overwrites the `routing` value for search operations. */
21611
- search_routing?: Routing;
21640
+ search_routing?: string;
21612
21641
  }
21613
21642
  export interface IndicesAliasDefinition {
21614
21643
  /** Query used to limit documents the alias can access. */
@@ -24321,7 +24350,7 @@ export interface IndicesPutAliasRequest extends RequestBase {
24321
24350
  /** Value used to route indexing operations to a specific shard.
24322
24351
  * If specified, this overwrites the `routing` value for indexing operations.
24323
24352
  * Data stream aliases don’t support this parameter. */
24324
- index_routing?: Routing;
24353
+ index_routing?: string;
24325
24354
  /** If `true`, sets the write index or data stream for the alias.
24326
24355
  * If an alias points to multiple indices or data streams and `is_write_index` isn’t set, the alias rejects write requests.
24327
24356
  * If an index alias points to one index and `is_write_index` isn’t set, the index automatically acts as the write index.
@@ -24329,11 +24358,11 @@ export interface IndicesPutAliasRequest extends RequestBase {
24329
24358
  is_write_index?: boolean;
24330
24359
  /** Value used to route indexing and search operations to a specific shard.
24331
24360
  * Data stream aliases don’t support this parameter. */
24332
- routing?: Routing;
24361
+ routing?: string;
24333
24362
  /** Value used to route search operations to a specific shard.
24334
24363
  * If specified, this overwrites the `routing` value for search operations.
24335
24364
  * Data stream aliases don’t support this parameter. */
24336
- search_routing?: Routing;
24365
+ search_routing?: string;
24337
24366
  /** All values in `body` will be added to the request body. */
24338
24367
  body?: string | ({
24339
24368
  [key: string]: any;
@@ -26055,18 +26084,18 @@ export interface IndicesUpdateAliasesAddAction {
26055
26084
  /** Value used to route indexing operations to a specific shard.
26056
26085
  * If specified, this overwrites the `routing` value for indexing operations.
26057
26086
  * Data stream aliases don’t support this parameter. */
26058
- index_routing?: Routing;
26087
+ index_routing?: string;
26059
26088
  /** If `true`, the alias is hidden. */
26060
26089
  is_hidden?: boolean;
26061
26090
  /** If `true`, sets the write index or data stream for the alias. */
26062
26091
  is_write_index?: boolean;
26063
26092
  /** Value used to route indexing and search operations to a specific shard.
26064
26093
  * Data stream aliases don’t support this parameter. */
26065
- routing?: Routing;
26094
+ routing?: string;
26066
26095
  /** Value used to route search operations to a specific shard.
26067
26096
  * If specified, this overwrites the `routing` value for search operations.
26068
26097
  * Data stream aliases don’t support this parameter. */
26069
- search_routing?: Routing;
26098
+ search_routing?: string;
26070
26099
  /** If `true`, the alias must exist to perform the action. */
26071
26100
  must_exist?: boolean;
26072
26101
  }
@@ -27845,9 +27874,10 @@ export interface InferenceDeleteRequest extends RequestBase {
27845
27874
  }
27846
27875
  export type InferenceDeleteResponse = InferenceDeleteInferenceEndpointResult;
27847
27876
  export interface InferenceGetRequest extends RequestBase {
27848
- /** The task type */
27877
+ /** The task type of the endpoint to return */
27849
27878
  task_type?: InferenceTaskType;
27850
- /** The inference Id */
27879
+ /** The inference Id of the endpoint to return. Using `_all` or `*` will return all endpoints with the specified
27880
+ * `task_type` if one is specified, or all endpoints for all task types if no `task_type` is specified */
27851
27881
  inference_id?: Id;
27852
27882
  /** All values in `body` will be added to the request body. */
27853
27883
  body?: string | ({
@@ -37569,9 +37599,14 @@ export interface NodesStatsResponseBase extends NodesNodesResponseBase {
37569
37599
  nodes: Record<string, NodesStats>;
37570
37600
  }
37571
37601
  export interface NodesUsageNodeUsage {
37602
+ /** The total number of times each REST endpoint has been called on this node since the last restart.
37603
+ * Note that the REST endpoint names are not considered stable. */
37572
37604
  rest_actions: Record<string, integer>;
37605
+ /** The timestamp for when the collection of these statistics started. */
37573
37606
  since: EpochTime<UnitMillis>;
37607
+ /** The timestamp for when these statistics were collected. */
37574
37608
  timestamp: EpochTime<UnitMillis>;
37609
+ /** The total number of times search aggregations have been called on this node since the last restart. */
37575
37610
  aggregations: Record<string, any>;
37576
37611
  }
37577
37612
  export type NodesUsageNodesUsageMetric = '_all' | 'rest_actions' | 'aggregations';