Skip to content

Commit 32e0500

Browse files
committed
Add more search edits
1 parent ce24dfc commit 32e0500

24 files changed

+828
-199
lines changed

output/openapi/elasticsearch-openapi.json

Lines changed: 43 additions & 35 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

output/openapi/elasticsearch-serverless-openapi.json

Lines changed: 43 additions & 35 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

output/schema/schema.json

Lines changed: 87 additions & 61 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

specification/_doc_ids/table.csv

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,7 @@ logstash-centralized-pipeline-management,https://www.elastic.co/guide/en/logstas
300300
logstash-configuration-file-structure,https://www.elastic.co/guide/en/logstash/{branch}/configuration-file-structure.html
301301
logstash-logstash-settings-file,https://www.elastic.co/guide/en/logstash/{branch}/logstash-settings-file.html
302302
lowercase-processor,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/lowercase-processor.html
303+
mapbox-vector-tile,https://github.com/mapbox/vector-tile-spec/blob/master/README.md
303304
mapping-date-format,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/mapping-date-format.html
304305
mapping-meta-field,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/mapping-meta-field.html
305306
mapping-params,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/mapping-params.html
@@ -512,6 +513,7 @@ routing,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/docs-ge
512513
run-as-privilege,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/run-as-privilege.html
513514
runtime-search-request,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/runtime-search-request.html
514515
script-processor,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/script-processor.html
516+
scroll-api,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/scroll-api.html
515517
scroll-search-results,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/paginate-search-results.html#scroll-search-results
516518
search-after,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/paginate-search-results.html#search-after
517519
search-aggregations,https://www.elastic.co/guide/en/elasticsearch/reference/{branch}/search-aggregations.html

specification/_global/field_caps/FieldCapabilitiesRequest.ts

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ import { QueryContainer } from '@_types/query_dsl/abstractions'
3535
* @availability serverless stability=stable visibility=public
3636
* @index_privileges view_index_metadata,read
3737
* @doc_tag search
38+
* @doc_id search-field-caps
3839
*/
3940
export interface Request extends RequestBase {
4041
urls: [
@@ -49,7 +50,7 @@ export interface Request extends RequestBase {
4950
]
5051
path_parts: {
5152
/**
52-
* Comma-separated list of data streams, indices, and aliases used to limit the request. Supports wildcards (*). To target all data streams and indices, omit this parameter or use * or _all.
53+
* A comma-separated list of data streams, indices, and aliases used to limit the request. Supports wildcards (*). To target all data streams and indices, omit this parameter or use * or _all.
5354
*/
5455
index?: Indices
5556
}
@@ -62,12 +63,12 @@ export interface Request extends RequestBase {
6263
*/
6364
allow_no_indices?: boolean
6465
/**
65-
* Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as `open,hidden`.
66+
* The type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as `open,hidden`.
6667
* @server_default open
6768
*/
6869
expand_wildcards?: ExpandWildcards
6970
/**
70-
* Comma-separated list of fields to retrieve capabilities for. Wildcard (`*`) expressions are supported.
71+
* A comma-separated list of fields to retrieve capabilities for. Wildcard (`*`) expressions are supported.
7172
*/
7273
fields?: Fields
7374
/**
@@ -81,11 +82,15 @@ export interface Request extends RequestBase {
8182
*/
8283
include_unmapped?: boolean
8384
/**
85+
* A comma-separated list of filters to apply to the response.
8486
* @availability stack since=8.2.0
8587
* @availability serverless
8688
*/
8789
filters?: string
8890
/**
91+
* A comma-separated list of field types to include.
92+
* Any fields that do not match one of these types will be excluded from the results.
93+
* It defaults to empty, meaning that all field types are returned.
8994
* @availability stack since=8.2.0
9095
* @availability serverless
9196
*/
@@ -100,17 +105,21 @@ export interface Request extends RequestBase {
100105
}
101106
body: {
102107
/**
103-
* List of fields to retrieve capabilities for. Wildcard (`*`) expressions are supported.
108+
* A list of fields to retrieve capabilities for. Wildcard (`*`) expressions are supported.
104109
* @availability stack since=8.5.0
105110
* @availability serverless
106111
*/
107112
fields?: Fields
108113
/**
109-
* Allows to filter indices if the provided query rewrites to match_none on every shard.
114+
* Filter indices if the provided query rewrites to `match_none` on every shard.
115+
*
116+
* IMPORTANT: The filtering is done on a best-effort basis, it uses index statistics and mappings to rewrite queries to `match_none` instead of fully running the request.
117+
* For instance a range query over a date field can rewrite to `match_none` if all documents within a shard (including deleted documents) are outside of the provided range.
118+
* However, not all queries can rewrite to `match_none` so this API may return an index even if the provided filter matches no document.
110119
*/
111120
index_filter?: QueryContainer
112121
/**
113-
* Defines ad-hoc runtime fields in the request similar to the way it is done in search requests.
122+
* Define ad-hoc runtime fields in the request similar to the way it is done in search requests.
114123
* These fields exist only as part of the query and take precedence over fields defined with the same name in the index mappings.
115124
* @doc_id runtime-search-request
116125
* @availability stack since=7.12.0

specification/_global/field_caps/FieldCapabilitiesResponse.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ import { FieldCapability } from './types'
2929
*/
3030
export class Response {
3131
body: {
32+
/**
33+
* The list of indices where this field has the same type family, or null if all indices have the same type family for the field.
34+
*/
3235
indices: Indices
3336
fields: Dictionary<Field, Dictionary<string, FieldCapability>>
3437
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# summary:
2+
# method_request: "POST my-index-*/_field_caps?fields=rating"
3+
description: >
4+
Run `POST my-index-*/_field_caps?fields=rating` to get field capabilities and filter indices with a query.
5+
Indices that rewrite the provided filter to `match_none` on every shard will be filtered from the response.
6+
# type: "request"
7+
value: |-
8+
{
9+
"index_filter": {
10+
"range": {
11+
"@timestamp": {
12+
"gte": "2018"
13+
}
14+
}
15+
}
16+
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
summary: Get two fields
2+
# type: "response"
3+
description: >
4+
A successful response from `GET _field_caps?fields=rating,title`.
5+
The field `rating` is defined as a long in `index1` and `index2` and as a `keyword` in `index3` and `index4`.
6+
The field `rating` is not aggregatable in `index1`.
7+
The field `rating` is not searchable in `index4`.
8+
The field `title` is defined as text in all indices.
9+
# response_code: 200,
10+
value: |-
11+
{
12+
"indices": [ "index1", "index2", "index3", "index4", "index5" ],
13+
"fields": {
14+
"rating": {
15+
"long": {
16+
"metadata_field": false,
17+
"searchable": true,
18+
"aggregatable": false,
19+
"indices": [ "index1", "index2" ],
20+
"non_aggregatable_indices": [ "index1" ]
21+
},
22+
"keyword": {
23+
"metadata_field": false,
24+
"searchable": false,
25+
"aggregatable": true,
26+
"indices": [ "index3", "index4" ],
27+
"non_searchable_indices": [ "index4" ]
28+
}
29+
},
30+
"title": {
31+
"text": {
32+
"metadata_field": false,
33+
"searchable": true,
34+
"aggregatable": false
35+
}
36+
}
37+
}
38+
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
summary: Get unmapped fields
2+
# type: "response"
3+
description: >
4+
A successful response from `GET _field_caps?fields=rating,title&include_unmapped`.
5+
The response contains an entry for each field that is present in some indices but not all.
6+
For example, the `rating` and `title` fields are unmapped in `index5`.
7+
# response_code: 200,
8+
value: |-
9+
{
10+
"indices": [ "index1", "index2", "index3", "index4", "index5" ],
11+
"fields": {
12+
"rating": {
13+
"long": {
14+
"metadata_field": false,
15+
"searchable": true,
16+
"aggregatable": false,
17+
"indices": [ "index1", "index2" ],
18+
"non_aggregatable_indices": [ "index1" ]
19+
},
20+
"keyword": {
21+
"metadata_field": false,
22+
"searchable": false,
23+
"aggregatable": true,
24+
"indices": [ "index3", "index4" ],
25+
"non_searchable_indices": [ "index4" ]
26+
}
27+
},
28+
"title": {
29+
"text": {
30+
"metadata_field": false,
31+
"searchable": true,
32+
"aggregatable": false
33+
}
34+
}
35+
}
36+
}

specification/_global/mget/examples/response/PutAutoscalingPolicyResponseExample1.yaml

Lines changed: 0 additions & 5 deletions
This file was deleted.

specification/_global/mtermvectors/MultiTermVectorsRequest.ts

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,22 @@ import { Operation } from './types'
3131
/**
3232
* Get multiple term vectors.
3333
*
34+
* Get multiple term vectors with a single request.
3435
* You can specify existing documents by index and ID or provide artificial documents in the body of the request.
3536
* You can specify the index in the request body or request URI.
3637
* The response contains a `docs` array with all the fetched termvectors.
3738
* Each element has the structure provided by the termvectors API.
39+
*
40+
* **Artificial documents**
41+
*
42+
* You can also use `mtermvectors` to generate term vectors for artificial documents provided in the body of the request.
43+
* The mapping used is determined by the specified `_index`.
3844
* @rest_spec_name mtermvectors
3945
* @availability stack stability=stable
4046
* @availability serverless stability=stable visibility=public
47+
* @index_privileges read
4148
* @doc_tag document
49+
* @doc_id docs-multi-termvectors
4250
*/
4351
export interface Request extends RequestBase {
4452
urls: [
@@ -53,15 +61,15 @@ export interface Request extends RequestBase {
5361
]
5462
path_parts: {
5563
/**
56-
* Name of the index that contains the documents.
64+
* The name of the index that contains the documents.
5765
*/
5866
index?: IndexName
5967
}
6068
query_parameters: {
6169
ids?: Id[]
6270
/**
63-
* Comma-separated list or wildcard expressions of fields to include in the statistics.
64-
* Used as the default list unless a specific field list is provided in the `completion_fields` or `fielddata_fields` parameters.
71+
* A comma-separated list or wildcard expressions of fields to include in the statistics.
72+
* It is used as the default list unless a specific field list is provided in the `completion_fields` or `fielddata_fields` parameters.
6573
*/
6674
fields?: Fields
6775
/**
@@ -85,8 +93,8 @@ export interface Request extends RequestBase {
8593
*/
8694
positions?: boolean
8795
/**
88-
* Specifies the node or shard the operation should be performed on.
89-
* Random by default.
96+
* The node or shard the operation should be performed on.
97+
* It is random by default.
9098
*/
9199
preference?: string
92100
/**
@@ -109,7 +117,7 @@ export interface Request extends RequestBase {
109117
*/
110118
version?: VersionNumber
111119
/**
112-
* Specific version type.
120+
* The version type.
113121
*/
114122
version_type?: VersionType
115123
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
summary: Get multiple term vectors
2+
# method_request: "POST /my-index-000001/_mtermvectors"
3+
description: >
4+
Run `POST /my-index-000001/_mtermvectors`.
5+
When you specify an index in the request URI, the index does not need to be specified for each documents in the request body.
6+
# type: "request"
7+
value: |-
8+
{
9+
"docs": [
10+
{
11+
"_id": "2",
12+
"fields": [
13+
"message"
14+
],
15+
"term_statistics": true
16+
},
17+
{
18+
"_id": "1"
19+
}
20+
]
21+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
summary: Artificial documents
2+
# method_request: "POST /_mtermvectors"
3+
description: >
4+
Run `POST /_mtermvectors` to generate term vectors for artificial documents.
5+
The mapping used is determined by the specified `_index`.
6+
# type: "request"
7+
value: |-
8+
{
9+
"docs": [
10+
{
11+
"_index": "my-index-000001",
12+
"doc" : {
13+
"message" : "test test test"
14+
}
15+
},
16+
{
17+
"_index": "my-index-000001",
18+
"doc" : {
19+
"message" : "Another test ..."
20+
}
21+
}
22+
]
23+
}

specification/_global/rank_eval/RankEvalRequest.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ export interface Request extends RequestBase {
4444
]
4545
path_parts: {
4646
/**
47-
* Comma-separated list of data streams, indices, and index aliases used to limit the request. Wildcard (`*`) expressions are supported.
47+
* A comma-separated list of data streams, indices, and index aliases used to limit the request.
48+
* Wildcard (`*`) expressions are supported.
4849
* To target all data streams and indices in a cluster, omit this parameter or use `_all` or `*`.
4950
*/
5051
index?: Indices

specification/_global/scroll/ScrollRequest.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ import { Duration } from '@_types/Time'
3939
* @rest_spec_name scroll
4040
* @availability stack stability=stable
4141
* @availability serverless stability=stable visibility=public
42+
* @index_privileges read
4243
* @doc_tag search
44+
* @doc_id scroll-api
4345
* @ext_doc_id scroll-search-results
4446
*/
4547
export interface Request extends RequestBase {
@@ -60,7 +62,7 @@ export interface Request extends RequestBase {
6062
}
6163
query_parameters: {
6264
/**
63-
* Period to retain the search context for scrolling.
65+
* The period to retain the search context for scrolling.
6466
* @doc_id scroll-search-results
6567
* @server_default 1d
6668
*/
@@ -75,12 +77,12 @@ export interface Request extends RequestBase {
7577
}
7678
body: {
7779
/**
78-
* Period to retain the search context for scrolling.
80+
* The period to retain the search context for scrolling.
7981
* @doc_id scroll-search-results
8082
* @server_default 1d
8183
*/
8284
scroll?: Duration
83-
/** Scroll ID of the search. */
85+
/** The scroll ID of the search. */
8486
scroll_id: ScrollId
8587
}
8688
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#
2+
# method_request: "GET /_search/scroll"
3+
description: Run `GET /_search/scroll` to get the next batch of results for a scrolling search.
4+
# type: "request"
5+
value: |-
6+
{
7+
"scroll_id" : "DXF1ZXJ5QW5kRmV0Y2gBAAAAAAAAAD4WYm9laVYtZndUQlNsdDcwakFMNjU1QQ=="
8+
}

specification/_global/search/SearchRequest.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ import { Suggester } from './_types/suggester'
7575
* @availability stack stability=stable
7676
* @availability serverless stability=stable visibility=public
7777
* @index_privileges read
78+
* @doc_id search-search
7879
* @ext_doc_id ccs-privileges
7980
*/
8081
export interface Request extends RequestBase {

0 commit comments

Comments
 (0)