Skip to content

Commit 4b20cc0

Browse files
authored
Added search_pipeline, verbose_pipeline, include_named_queries_score and derived to search_request_body (#981)
* Added `search_pipeline`, `verbose_pipeline`, `include_named_queries_score` and `derived` to search_request_body Signed-off-by: xil <[email protected]>
1 parent 5bdee1a commit 4b20cc0

File tree

5 files changed

+49
-6
lines changed

5 files changed

+49
-6
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
307307
- Added a spec style checker [#620](https://github.com/opensearch-project/opensearch-api-specification/pull/620).
308308
- Added `remote_store` to node `Stats` ([#643](https://github.com/opensearch-project/opensearch-api-specification/pull/643))
309309
- Added `x-protobuf-excluded` vendor extension ([#980](https://github.com/opensearch-project/opensearch-api-specification/pull/980))
310+
- Added `search_pipeline`, `verbose_pipeline`, `include_named_queries_score` and `derived` to search_request_body. `primary` to `ShardFailure`, `header` to `ErrorCause` and Replace InnerHits `fields` from type `Fields` to `FieldAndFormat`([#981](https://github.com/opensearch-project/opensearch-api-specification/pull/981))
310311

311312
### Changed
312313

spec/namespaces/_core.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2614,6 +2614,12 @@ components:
26142614
Set to `true` to return detailed timing information about the execution of individual components in a search request.
26152615
NOTE: This is a debugging tool and adds significant overhead to search execution.
26162616
type: boolean
2617+
search_pipeline:
2618+
description: Customizable sequence of processing stages applied to search queries.
2619+
type: string
2620+
verbose_pipeline:
2621+
description: Enables or disables verbose mode for the search pipeline.
2622+
type: boolean
26172623
query:
26182624
$ref: '../schemas/_common.query_dsl.yaml#/components/schemas/QueryContainer'
26192625
rescore:
@@ -2673,6 +2679,9 @@ components:
26732679
track_scores:
26742680
description: If `true`, calculate and return document scores, even if the scores are not used for sorting.
26752681
type: boolean
2682+
include_named_queries_score:
2683+
description: Whether to return scores with named queries. Default is false.
2684+
type: boolean
26762685
version:
26772686
description: If `true`, returns document version as part of a hit.
26782687
type: boolean
@@ -2691,6 +2700,11 @@ components:
26912700
type: array
26922701
items:
26932702
type: string
2703+
derived:
2704+
type: object
2705+
x-version-added: '2.14'
2706+
additionalProperties:
2707+
$ref: '../schemas/_common.yaml#/components/schemas/DerivedField'
26942708
description: The search definition using the Query DSL
26952709
search_template:
26962710
content:

spec/schemas/_common.query_dsl.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -844,8 +844,6 @@ components:
844844
format:
845845
description: Format in which the values are returned.
846846
type: string
847-
include_unmapped:
848-
type: boolean
849847
required:
850848
- field
851849
ChildScoreMode:
@@ -1131,7 +1129,7 @@ components:
11311129
description: If `true`, match phrase queries are automatically created for multi-term synonyms.
11321130
type: boolean
11331131
cutoff_frequency:
1134-
deprecated: true
1132+
x-version-deprecated: '2.0'
11351133
type: number
11361134
format: float
11371135
fuzziness:

spec/schemas/_common.yaml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,8 @@ components:
332332
type: integer
333333
status:
334334
type: string
335+
primary:
336+
type: boolean
335337
required:
336338
- reason
337339
- shard
@@ -357,6 +359,12 @@ components:
357359
type: array
358360
items:
359361
$ref: '#/components/schemas/ErrorCause'
362+
header:
363+
oneOf:
364+
- type: string
365+
- type: array
366+
items:
367+
type: string
360368
required:
361369
- type
362370
additionalProperties:
@@ -560,6 +568,27 @@ components:
560568
description: Whether to ignore failures during script execution.
561569
required:
562570
- script
571+
DerivedField:
572+
type: object
573+
properties:
574+
name:
575+
type: string
576+
type:
577+
type: string
578+
script:
579+
$ref: '#/components/schemas/Script'
580+
prefilter_field:
581+
type: string
582+
properties:
583+
type: object
584+
ignore_malformed:
585+
type: boolean
586+
format:
587+
type: string
588+
required:
589+
- name
590+
- script
591+
- type
563592
Sort:
564593
oneOf:
565594
- $ref: '#/components/schemas/SortCombinations'
@@ -670,6 +699,7 @@ components:
670699
validation_method:
671700
$ref: '_common.query_dsl.yaml#/components/schemas/GeoValidationMethod'
672701
additionalProperties:
702+
title: location
673703
type: array
674704
description: The geo points to use for distance calculation.
675705
items:

spec/schemas/_core.search.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -769,7 +769,9 @@ components:
769769
seq_no_primary_term:
770770
type: boolean
771771
fields:
772-
$ref: '_common.yaml#/components/schemas/Fields'
772+
type: array
773+
items:
774+
$ref: '_common.query_dsl.yaml#/components/schemas/FieldAndFormat'
773775
sort:
774776
$ref: '_common.yaml#/components/schemas/Sort'
775777
_source:
@@ -822,8 +824,6 @@ components:
822824
properties:
823825
matched_fields:
824826
$ref: '_common.yaml#/components/schemas/Fields'
825-
analyzer:
826-
$ref: '_common.analysis.yaml#/components/schemas/Analyzer'
827827
HighlightBase:
828828
type: object
829829
properties:

0 commit comments

Comments
 (0)