Skip to content

Commit 5718a76

Browse files
committed
Add overlays and externalDocs for knn, highlight, and fieldcollapse
1 parent dcb8dbb commit 5718a76

File tree

5 files changed

+46
-8
lines changed

5 files changed

+46
-8
lines changed

docs/overlays/elasticsearch-shared-overlays.yaml

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1056,12 +1056,6 @@ actions:
10561056
externalDocs:
10571057
url: https://www.elastic.co/docs/explore-analyze/query-filter/languages/querydsl
10581058
description: Query DSL
1059-
- target: "$.components['schemas']['_global.search._types.FieldCollapse']"
1060-
description: Add x-model and externalDocs
1061-
update:
1062-
x-model: true
1063-
externalDocs:
1064-
url: https://www.elastic.co/docs/reference/elasticsearch/rest-apis/collapse-search-results
10651059
- target: "$.components['schemas']['_global.search._types.SearchRequestBody'].properties"
10661060
description: Add x-model to SearchRequestBody aggregations property
10671061
update:
@@ -1077,6 +1071,36 @@ actions:
10771071
- target: "$.components['schemas']['_types.query_dsl.QueryContainer'].properties"
10781072
description: Remove the QueryContainer properties
10791073
remove: true
1074+
- target: "$.components['schemas']['_global.search._types.FieldCollapse']"
1075+
description: Add x-model and externalDocs to FieldCollapse
1076+
update:
1077+
x-model: true
1078+
externalDocs:
1079+
url: https://www.elastic.co/docs/reference/elasticsearch/rest-apis/collapse-search-results
1080+
- target: "$.components['schemas']['_global.search._types.FieldCollapse'].properties"
1081+
description: Remove properties from FieldCollapse
1082+
remove: true
1083+
- target: "$.components['schemas']['_global.search._types.FieldCollapse'].required"
1084+
description: Remove required from FieldCollapse
1085+
remove: true
1086+
- target: "$.components['schemas']['_global.search._types.Highlight']"
1087+
description: Add x-model, description, and externalDocs to Highlight
1088+
update:
1089+
x-model: true
1090+
description: The highlighter to use for retrieving highlighted snippets from one or more fields in your search results.
1091+
externalDocs:
1092+
url: https://www.elastic.co/docs/reference/elasticsearch/rest-apis/highlighting
1093+
- target: "$.components['schemas']['_global.search._types.Highlight'].allOf"
1094+
description: Remove allOf from Highlight
1095+
remove: true
1096+
- target: "$.components['schemas']['_global.search._types.SearchRequestBody'].properties.knn"
1097+
description: Add x-model to SearchRequestBody knn
1098+
update:
1099+
x-model: true
1100+
- target: "$.components['schemas']['_global.search._types.SearchRequestBody'].properties.knn.oneOf"
1101+
description: Remove oneOf from knn
1102+
remove: true
1103+
# Examples
10801104
# Examples
10811105
## xCodeSamples
10821106
- target: "$.paths['/{index}/_doc/{id}']['head']"

output/schema/schema.json

Lines changed: 10 additions & 2 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
@@ -706,9 +706,11 @@ search-application-get,https://www.elastic.co/docs/api/doc/elasticsearch/operati
706706
search-application-put,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search-application-put
707707
search-application-search,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search-application-search
708708
search-render-query,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-search-application-render-query
709+
search-retrievers,https://www.elastic.co/docs/reference/elasticsearch/rest-apis/retrievers
709710
search-count,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-count
710711
search-explain,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-explain
711712
search-field-caps,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-field-caps
713+
search-highlight,https://www.elastic.co/docs/reference/elasticsearch/rest-apis/highlighting
712714
search-knn,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-knn-search
713715
search-multi-search,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-msearch
714716
search-multi-search-template,https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-msearch-template

specification/_global/search/SearchRequest.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -413,6 +413,7 @@ export interface Request extends RequestBase {
413413
from?: integer
414414
/**
415415
* Specifies the highlighter to use for retrieving highlighted snippets from one or more fields in your search results.
416+
* @ext_doc_id search-highlight
416417
*/
417418
highlight?: Highlight
418419
/**
@@ -479,6 +480,7 @@ export interface Request extends RequestBase {
479480
* A retriever replaces other elements of the search API that also return top documents such as `query` and `knn`.
480481
* @availability stack since=8.14.0 stability=stable
481482
* @availability serverless stability=stable
483+
* @ext_doc_id search-retrievers
482484
*/
483485
retriever?: RetrieverContainer
484486
/**

specification/_global/search/_types/SearchRequestBody.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ export class SearchRequestBody {
6868
from?: integer
6969
/**
7070
* Specifies the highlighter to use for retrieving highlighted snippets from one or more fields in your search results.
71+
* @ext_doc_id search-highlight
7172
*/
7273
highlight?: Highlight
7374
/**
@@ -134,6 +135,7 @@ export class SearchRequestBody {
134135
* A retriever replaces other elements of the search API that also return top documents such as `query` and `knn`.
135136
* @availability stack since=8.14.0 stability=stable
136137
* @availability serverless stability=stable
138+
* @ext_doc_id search-retrievers
137139
*/
138140
retriever?: RetrieverContainer
139141
/**

0 commit comments

Comments
 (0)