Skip to content

Commit af0aac1

Browse files
committed
Fix async search examples
1 parent 13b8259 commit af0aac1

20 files changed

+199
-75
lines changed

docs/overlays/elasticsearch-shared-overlays.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2463,6 +2463,30 @@ actions:
24632463
examples:
24642464
asyncSearchSubmitResponseExample1:
24652465
$ref: "../../specification/async_search/submit/examples/response/AsyncSearchSubmitResponseExample1.yaml"
2466+
- target: "$.paths['/_async_search/status/{id}']['get']"
2467+
description: "Add examples for get async search status"
2468+
update:
2469+
responses:
2470+
200:
2471+
content:
2472+
application/json:
2473+
examples:
2474+
asyncSearchStatusResponseExample1:
2475+
$ref: "../../specification/async_search/status/examples/response/AsyncSearchStatusResponseExample1.yaml"
2476+
asyncSearchStatusResponseExample2:
2477+
$ref: "../../specification/async_search/status/examples/response/AsyncSearchStatusResponseExample2.yaml"
2478+
asyncSearchStatusResponseExample3:
2479+
$ref: "../../specification/async_search/status/examples/response/AsyncSearchStatusResponseExample3.yaml"
2480+
- target: "$.paths['/_async_search/{id}']['get']"
2481+
description: "Add examples for get async search"
2482+
update:
2483+
responses:
2484+
200:
2485+
content:
2486+
application/json:
2487+
examples:
2488+
asyncSearchResponseExample1:
2489+
$ref: "../../specification/async_search/get/examples/response/AsyncSearchGetResponseExample1.yaml"
24662490
## Examples for search applications
24672491
- target: "$.paths['/_application/search_application']['get']"
24682492
description: "Add examples for get search applications operation"

output/openapi/elasticsearch-openapi.json

Lines changed: 6 additions & 6 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: 6 additions & 6 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: 18 additions & 13 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

specification/async_search/_types/AsyncSearch.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import { ClusterStatistics, ShardStatistics } from '@_types/Stats'
2929

3030
export class AsyncSearch<TDocument> {
3131
/**
32-
* Partial aggregations results, coming from the shards that have already completed the execution of the query.
32+
* Partial aggregations results, coming from the shards that have already completed running the query.
3333
*/
3434
aggregations?: Dictionary<AggregateName, Aggregate>
3535
_clusters?: ClusterStatistics

specification/async_search/_types/AsyncSearchResponseBase.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@ export class AsyncSearchResponseBase {
3030
is_partial: boolean
3131
/**
3232
* Indicates whether the search is still running or has completed.
33-
* NOTE: If the search failed after some shards returned their results or the node that is coordinating the async search dies, results may be partial even though `is_running` is `false`.
33+
*
34+
* > info
35+
* > If the search failed after some shards returned their results or the node that is coordinating the async search dies, results may be partial even though `is_running` is `false`.
3436
*/
3537
is_running: boolean
3638
/**
@@ -41,8 +43,8 @@ export class AsyncSearchResponseBase {
4143
start_time?: DateTime
4244
start_time_in_millis: EpochTime<UnitMillis>
4345
/**
44-
* Indicates when the async search completed. Only present
45-
* when the search has completed.
46+
* Indicates when the async search completed.
47+
* It is present only when the search has completed.
4648
*/
4749
completion_time?: DateTime
4850
completion_time_in_millis?: EpochTime<UnitMillis>

specification/async_search/get/AsyncSearchGetRequest.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export interface Request extends RequestBase {
4545
}
4646
query_parameters: {
4747
/**
48-
* Specifies how long the async search should be available in the cluster.
48+
* The length of time that the async search should be available in the cluster.
4949
* When not specified, the `keep_alive` set with the corresponding submit async request will be used.
5050
* Otherwise, it is possible to override the value and extend the validity of the request.
5151
* When this period expires, the search, if still running, is cancelled.

0 commit comments

Comments
 (0)