Skip to content

Commit b8e3c8d

Browse files
committed
[API] Adds project_routing (String) parameter:
* cat.count * count * eql.search * field_caps * indices.resolve_index * msearch * msearch_template * open_point_in_time * search_mvt * search_template * sql.query :project_routing Specifies a subset of projects to target for the search using project metadata tags in a subset of Lucene query syntax. Supported in serverless only.
1 parent b0ab86a commit b8e3c8d

File tree

13 files changed

+95
-6
lines changed

13 files changed

+95
-6
lines changed

elasticsearch-api/lib/elasticsearch/api/actions/async_search/submit.rb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,10 @@ module Actions
5151
# @option arguments [Boolean] :lenient Specify whether format-based query failures (such as providing text to a numeric field) should be ignored
5252
# @option arguments [Integer] :max_concurrent_shard_requests The number of concurrent shard requests per node this search executes concurrently. This value should be used to limit the impact of the search on the cluster in order to limit the number of concurrent shard requests
5353
# @option arguments [String] :preference Specify the node or shard the operation should be performed on (default: random)
54-
# @option arguments [String] :project_routing Specifies a subset of projects to target for a search using project metadata
55-
# tags in a subset Lucene syntax. Allowed Lucene queries: the _alias tag
56-
# and a single value (possible wildcarded). Examples:
54+
# @option arguments [String] :project_routing Specifies a subset of projects to target for the search using project
55+
# metadata tags in a subset of Lucene query syntax.
56+
# Allowed Lucene queries: the _alias tag and a single value (possibly wildcarded).
57+
# Examples:
5758
# _alias:my-project
5859
# _alias:_origin
5960
# _alias:*pr*

elasticsearch-api/lib/elasticsearch/api/actions/cat/count.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,14 @@ module Actions
3232
# It supports wildcards (`*`).
3333
# To target all data streams and indices, omit this parameter or use `*` or `_all`.
3434
# @option arguments [String, Array<String>] :h A comma-separated list of columns names to display. It supports simple wildcards.
35+
# @option arguments [String] :project_routing Specifies a subset of projects to target for the search using project
36+
# metadata tags in a subset of Lucene query syntax.
37+
# Allowed Lucene queries: the _alias tag and a single value (possibly wildcarded).
38+
# Examples:
39+
# _alias:my-project
40+
# _alias:_origin
41+
# _alias:*pr*
42+
# Supported in serverless only.
3543
# @option arguments [String, Array<String>] :s List of columns that determine how the table should be sorted.
3644
# Sorting defaults to ascending and can be changed by setting `:asc`
3745
# or `:desc` as a suffix to the column name.

elasticsearch-api/lib/elasticsearch/api/actions/count.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,14 @@ module Actions
5454
# @option arguments [Float] :min_score The minimum `_score` value that documents must have to be included in the result.
5555
# @option arguments [String] :preference The node or shard the operation should be performed on.
5656
# By default, it is random.
57+
# @option arguments [String] :project_routing Specifies a subset of projects to target for the search using project
58+
# metadata tags in a subset of Lucene query syntax.
59+
# Allowed Lucene queries: the _alias tag and a single value (possibly wildcarded).
60+
# Examples:
61+
# _alias:my-project
62+
# _alias:_origin
63+
# _alias:*pr*
64+
# Supported in serverless only.
5765
# @option arguments [String] :routing A custom value used to route operations to a specific shard.
5866
# @option arguments [Integer] :terminate_after The maximum number of documents to collect for each shard.
5967
# If a query reaches this limit, Elasticsearch terminates the query early.

elasticsearch-api/lib/elasticsearch/api/actions/eql/search.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,14 @@ module Actions
3636
# @option arguments [Boolean] :ignore_unavailable If true, missing or closed indices are not included in the response. Server default: true.
3737
# @option arguments [Time] :keep_alive Period for which the search and its results are stored on the cluster. Server default: 5d.
3838
# @option arguments [Boolean] :keep_on_completion If true, the search and its results are stored on the cluster.
39+
# @option arguments [String] :project_routing Specifies a subset of projects to target for the search using project
40+
# metadata tags in a subset of Lucene query syntax.
41+
# Allowed Lucene queries: the _alias tag and a single value (possibly wildcarded).
42+
# Examples:
43+
# _alias:my-project
44+
# _alias:_origin
45+
# _alias:*pr*
46+
# Supported in serverless only.
3947
# @option arguments [Time] :wait_for_completion_timeout Timeout duration to wait for the request to finish. Defaults to no timeout, meaning the request waits for complete search results.
4048
# @option arguments [Boolean] :error_trace When set to `true` Elasticsearch will include the full stack trace of errors
4149
# when they occur.

elasticsearch-api/lib/elasticsearch/api/actions/field_caps.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,14 @@ module Actions
4040
# Any fields that do not match one of these types will be excluded from the results.
4141
# It defaults to empty, meaning that all field types are returned.
4242
# @option arguments [Boolean] :include_empty_fields If false, empty fields are not included in the response. Server default: true.
43+
# @option arguments [String] :project_routing Specifies a subset of projects to target for the field-caps query using project
44+
# metadata tags in a subset of Lucene query syntax.
45+
# Allowed Lucene queries: the _alias tag and a single value (possibly wildcarded).
46+
# Examples:
47+
# _alias:my-project
48+
# _alias:_origin
49+
# _alias:*pr*
50+
# Supported in serverless only.
4351
# @option arguments [Boolean] :error_trace When set to `true` Elasticsearch will include the full stack trace of errors
4452
# when they occur.
4553
# @option arguments [String, Array<String>] :filter_path Comma-separated list of filters in dot notation which reduce the response

elasticsearch-api/lib/elasticsearch/api/actions/indices/resolve_index.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,14 @@ module Actions
3636
# This behavior applies even if the request targets other open indices.
3737
# For example, a request targeting `foo*,bar*` returns an error if an index starts with `foo` but no index starts with `bar`. Server default: true.
3838
# @option arguments [String, Array<String>] :mode Filter indices by index mode - standard, lookup, time_series, etc. Comma-separated list of IndexMode. Empty means no filter.
39+
# @option arguments [String] :project_routing Specifies a subset of projects to target using project
40+
# metadata tags in a subset of Lucene query syntax.
41+
# Allowed Lucene queries: the _alias tag and a single value (possibly wildcarded).
42+
# Examples:
43+
# _alias:my-project
44+
# _alias:_origin
45+
# _alias:*pr*
46+
# Supported in serverless only.
3947
# @option arguments [Boolean] :error_trace When set to `true` Elasticsearch will include the full stack trace of errors
4048
# when they occur.
4149
# @option arguments [String, Array<String>] :filter_path Comma-separated list of filters in dot notation which reduce the response

elasticsearch-api/lib/elasticsearch/api/actions/msearch.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,13 @@ module Actions
5757
# Defaults to `max(1, (# of data nodes * min(search thread pool size, 10)))`.
5858
# @option arguments [Integer] :max_concurrent_shard_requests Maximum number of concurrent shard requests that each sub-search request executes per node. Server default: 5.
5959
# @option arguments [Integer] :pre_filter_shard_size Defines a threshold that enforces a pre-filter roundtrip to prefilter search shards based on query rewriting if the number of shards the search request expands to exceeds the threshold. This filter roundtrip can limit the number of shards significantly if for instance a shard can not match any documents based on its rewrite method i.e., if date filters are mandatory to match but the shard bounds and the query are disjoint.
60+
# @option arguments [String] :project_routing Specifies a subset of projects to target for a search using project metadata
61+
# tags in a subset Lucene syntax. Allowed Lucene queries: the _alias tag
62+
# and a single value (possible wildcarded). Examples:
63+
# _alias:my-project
64+
# _alias:_origin
65+
# _alias:*pr*
66+
# Supported in serverless only.
6067
# @option arguments [Boolean] :rest_total_hits_as_int If true, hits.total are returned as an integer in the response. Defaults to false, which returns an object.
6168
# @option arguments [String] :routing Custom routing value used to route search operations to a specific shard.
6269
# @option arguments [String] :search_type Indicates whether global term and document frequencies should be used when scoring returned documents.

elasticsearch-api/lib/elasticsearch/api/actions/msearch_template.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,14 @@ module Actions
4040
# To search all data streams and indices, omit this parameter or use `*`.
4141
# @option arguments [Boolean] :ccs_minimize_roundtrips If `true`, network round-trips are minimized for cross-cluster search requests. Server default: true.
4242
# @option arguments [Integer] :max_concurrent_searches The maximum number of concurrent searches the API can run.
43+
# @option arguments [String] :project_routing Specifies a subset of projects to target for the search using project
44+
# metadata tags in a subset of Lucene query syntax.
45+
# Allowed Lucene queries: the _alias tag and a single value (possibly wildcarded).
46+
# Examples:
47+
# _alias:my-project
48+
# _alias:_origin
49+
# _alias:*pr*
50+
# Supported in serverless only.
4351
# @option arguments [String] :search_type The type of the search operation.
4452
# @option arguments [Boolean] :rest_total_hits_as_int If `true`, the response returns `hits.total` as an integer.
4553
# If `false`, it returns `hits.total` as an object.

elasticsearch-api/lib/elasticsearch/api/actions/open_point_in_time.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,14 @@ module Actions
5353
# @option arguments [Boolean] :ignore_unavailable If `false`, the request returns an error if it targets a missing or closed index.
5454
# @option arguments [String] :preference The node or shard the operation should be performed on.
5555
# By default, it is random.
56+
# @option arguments [String] :project_routing Specifies a subset of projects to target for the PIT request using project
57+
# metadata tags in a subset of Lucene query syntax.
58+
# Allowed Lucene queries: the _alias tag and a single value (possibly wildcarded).
59+
# Examples:
60+
# _alias:my-project
61+
# _alias:_origin
62+
# _alias:*pr*
63+
# Supported in serverless only.
5664
# @option arguments [String] :routing A custom value that is used to route operations to a specific shard.
5765
# @option arguments [String, Array<String>] :expand_wildcards The type of index that wildcard patterns can match.
5866
# If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams.

elasticsearch-api/lib/elasticsearch/api/actions/search.rb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,10 @@ module Actions
8484
# - The request targets more than 128 shards.
8585
# - The request targets one or more read-only index.
8686
# - The primary sort of the query targets an indexed field.
87-
# @option arguments [String] :project_routing Specifies a subset of projects to target for a search using project metadata
88-
# tags in a subset Lucene syntax. Allowed Lucene queries: the _alias tag
89-
# and a single value (possible wildcarded). Examples:
87+
# @option arguments [String] :project_routing Specifies a subset of projects to target for the search using project
88+
# metadata tags in a subset of Lucene query syntax.
89+
# Allowed Lucene queries: the _alias tag and a single value (possibly wildcarded).
90+
# Examples:
9091
# _alias:my-project
9192
# _alias:_origin
9293
# _alias:*pr*

0 commit comments

Comments
 (0)