Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor the common query DSL spec to extract IgnoreUnmapped #515

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 15 additions & 20 deletions spec/schemas/_common.query_dsl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -591,6 +591,12 @@ components:
- type: boolean
required:
- value
IgnoreUnmapped:
type: boolean
default: false
description: |-
Set to `true` to ignore an unmapped field and not match any documents for this query.
Set to `false` to throw an exception if the field is not mapped.
GeoBoundingBoxQuery:
allOf:
- $ref: '#/components/schemas/QueryBase'
Expand All @@ -601,10 +607,7 @@ components:
validation_method:
$ref: '#/components/schemas/GeoValidationMethod'
ignore_unmapped:
description: |-
Set to `true` to ignore an unmapped field and not match any documents for this query.
Set to `false` to throw an exception if the field is not mapped.
type: boolean
$ref: '#/components/schemas/IgnoreUnmapped'
GeoExecution:
type: string
enum:
Expand All @@ -628,11 +631,7 @@ components:
validation_method:
$ref: '#/components/schemas/GeoValidationMethod'
ignore_unmapped:
description: |-
Set to `true` to ignore an unmapped field and not match any documents for this query.
Set to `false` to throw an exception if the field is not mapped.
type: boolean
default: false
$ref: '#/components/schemas/IgnoreUnmapped'
field:
type: object
required:
Expand All @@ -646,25 +645,22 @@ components:
validation_method:
$ref: '#/components/schemas/GeoValidationMethod'
ignore_unmapped:
type: boolean
$ref: '#/components/schemas/IgnoreUnmapped'
GeoShapeQuery:
allOf:
- $ref: '#/components/schemas/QueryBase'
- type: object
properties:
ignore_unmapped:
description: |-
Set to `true` to ignore an unmapped field and not match any documents for this query.
Set to `false` to throw an exception if the field is not mapped.
type: boolean
$ref: '#/components/schemas/IgnoreUnmapped'
HasChildQuery:
allOf:
- $ref: '#/components/schemas/QueryBase'
- type: object
properties:
ignore_unmapped:
$ref: '#/components/schemas/IgnoreUnmapped'
description: Indicates whether to ignore an unmapped `type` and not return any documents instead of an error.
type: boolean
inner_hits:
$ref: '_core.search.yaml#/components/schemas/InnerHits'
max_children:
Expand Down Expand Up @@ -712,10 +708,10 @@ components:
- type: object
properties:
ignore_unmapped:
$ref: '#/components/schemas/IgnoreUnmapped'
description: |-
Indicates whether to ignore an unmapped `parent_type` and not return any documents instead of an error.
You can use this parameter to query multiple indices that may not contain the `parent_type`.
type: boolean
inner_hits:
$ref: '_core.search.yaml#/components/schemas/InnerHits'
parent_type:
Expand Down Expand Up @@ -1209,8 +1205,8 @@ components:
- type: object
properties:
ignore_unmapped:
$ref: '#/components/schemas/IgnoreUnmapped'
description: Indicates whether to ignore an unmapped path and not return any documents instead of an error.
type: boolean
inner_hits:
$ref: '_core.search.yaml#/components/schemas/InnerHits'
path:
Expand All @@ -1230,8 +1226,8 @@ components:
id:
$ref: '_common.yaml#/components/schemas/Id'
ignore_unmapped:
$ref: '#/components/schemas/IgnoreUnmapped'
description: Indicates whether to ignore an unmapped `type` and not return any documents instead of an error.
type: boolean
type:
$ref: '_common.yaml#/components/schemas/RelationName'
PercolateQuery:
Expand Down Expand Up @@ -1585,8 +1581,7 @@ components:
- type: object
properties:
ignore_unmapped:
description: When set to `true` the query ignores an unmapped field and will not match any documents.
type: boolean
$ref: '#/components/schemas/IgnoreUnmapped'
SimpleQueryStringQuery:
allOf:
- $ref: '#/components/schemas/QueryBase'
Expand Down
Loading