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

update with accurate numeric type for common, core #612

Merged
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Fixed create/delete/index operation in `_bulk` ([#582](https://github.com/opensearch-project/opensearch-api-specification/pull/582))
- Add `mode` and `compression` to k-NN index creation and search, and add `rescore` and `oversample_factor` to k-NN search ([#588](https://github.com/opensearch-project/opensearch-api-specification/pull/588))
- Fixed `/{index}/_search` with aggregations ([#576](https://github.com/opensearch-project/opensearch-api-specification/pull/576))
- Fixed inaccurate numeric type ([#597](https://github.com/opensearch-project/opensearch-api-specification/pull/597))([#598](https://github.com/opensearch-project/opensearch-api-specification/pull/598))([#600](https://github.com/opensearch-project/opensearch-api-specification/pull/600))
- Fixed inaccurate numeric type ([#597](https://github.com/opensearch-project/opensearch-api-specification/pull/597))([#598](https://github.com/opensearch-project/opensearch-api-specification/pull/598))([#600](https://github.com/opensearch-project/opensearch-api-specification/pull/600))([#612](https://github.com/opensearch-project/opensearch-api-specification/pull/612))
- Fixed mapping and analysis types ([#600](https://github.com/opensearch-project/opensearch-api-specification/pull/600))
- Fixed `RestStatus` responses in `DELETE /_plugins/_notifications/configs/{config_id}` ([#594](https://github.com/opensearch-project/opensearch-api-specification/pull/594))
- Fixed `GET /_snapshot_/{repository}/{snapshot}` ([#608](https://github.com/opensearch-project/opensearch-api-specification/pull/608))
Expand Down
3 changes: 2 additions & 1 deletion spec/schemas/_common.query_dsl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1824,7 +1824,8 @@ components:
description: Can only be used as a clause in a span_near query.
type: object
additionalProperties:
type: number
type: integer
format: int32
minProperties: 1
maxProperties: 1
SpanMultiTermQuery:
Expand Down
65 changes: 47 additions & 18 deletions spec/schemas/_common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,20 @@ components:
type: object
properties:
1xx:
type: number
type: integer
format: int32
2xx:
type: number
type: integer
format: int32
3xx:
type: number
type: integer
format: int32
4xx:
type: number
type: integer
format: int32
5xx:
type: number
type: integer
format: int32
Duration:
description: |-
A duration. Units can be `nanos`, `micros`, `ms` (milliseconds), `s` (seconds), `m` (minutes), `h` (hours) and
Expand Down Expand Up @@ -162,6 +167,7 @@ components:
type: array
items:
type: number
format: double
- title: text
type: string
XyCartesianCoordinates:
Expand All @@ -171,9 +177,11 @@ components:
x:
description: The x coordinate.
type: number
format: double
y:
description: The y coordinate.
type: number
format: double
required:
- x
- y
Expand Down Expand Up @@ -239,24 +247,31 @@ components:
type: array
items:
type: number
format: double
required:
- coordinates
- type
ClusterStatistics:
type: object
properties:
skipped:
type: number
type: integer
format: int32
successful:
type: number
type: integer
format: int32
total:
type: number
type: integer
format: int32
running:
type: number
type: integer
format: int32
partial:
type: number
type: integer
format: int32
failed:
type: number
type: integer
format: int32
details:
type: object
additionalProperties:
Expand Down Expand Up @@ -438,7 +453,8 @@ components:
MinimumShouldMatch:
description: The minimum number of terms that should match as an integer, percentage, or range.
oneOf:
- type: number
- type: integer
format: int32
- type: string
Distance:
type: string
Expand Down Expand Up @@ -512,7 +528,8 @@ components:
Fuzziness:
oneOf:
- type: string
- type: number
- type: integer
format: int32
GeoDistanceType:
type: string
enum:
Expand Down Expand Up @@ -631,6 +648,7 @@ components:
$ref: '_common.query_dsl.yaml#/components/schemas/QueryContainer'
max_children:
type: integer
format: int32
nested:
$ref: '#/components/schemas/NestedSortValue'
path:
Expand Down Expand Up @@ -669,7 +687,8 @@ components:
GeoHashPrecision:
description: The level of geohash precision, which can be expressed as a geohash length between 1 and 12 or as a distance measure, such as "1km" or "10m".
oneOf:
- type: number
- type: integer
format: int32
- type: string
GeoTilePrecision:
type: number
Expand All @@ -682,14 +701,17 @@ components:
$ref: '#/components/schemas/QueryVector'
k:
description: The total number of nearest neighbors to return as top hits.
type: number
type: integer
format: int32
min_score:
description: The minimum similarity score required in order for a neighbor to be considered a hit.
type: number
format: float
x-version-added: '2.14'
max_distance:
description: The maximum physical vector space distance required in order for a neighbor to be considered a hit.
type: number
format: float
x-version-added: '2.14'
filter:
description: The filters for the k-NN search query.
Expand All @@ -701,22 +723,26 @@ components:
boost:
description: The boost value applied to k-NN scores.
type: number
format: float
method_parameters:
type: object
x-version-added: '2.16'
additionalProperties:
type: number
type: integer
format: int32
rescore:
type: object
x-version-added: '2.17'
additionalProperties:
type: number
format: float
required:
- vector
QueryVector:
type: array
items:
type: number
format: float
SlicedScroll:
type: object
properties:
Expand All @@ -725,7 +751,8 @@ components:
id:
$ref: '#/components/schemas/Id'
max:
type: number
type: integer
format: int32
required:
- id
- max
Expand Down Expand Up @@ -758,7 +785,8 @@ components:
_seq_no:
$ref: '#/components/schemas/SequenceNumber'
_primary_term:
type: number
type: integer
format: int32
_routing:
$ref: '#/components/schemas/Routing'
_source:
Expand Down Expand Up @@ -802,6 +830,7 @@ components:
format: int64
PercentageNumber:
type: number
format: double
PercentageString:
type: string
pattern: '\d+(\.\d+)?'
Expand Down
12 changes: 8 additions & 4 deletions spec/schemas/_core.bulk.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ components:
routing:
$ref: '_common.yaml#/components/schemas/Routing'
if_primary_term:
type: number
type: integer
format: int64
if_seq_no:
$ref: '_common.yaml#/components/schemas/SequenceNumber'
version:
Expand All @@ -71,7 +72,8 @@ components:
description: When `true`, the request's actions must target an index alias.
type: boolean
retry_on_conflict:
type: number
type: integer
format: int32
DeleteOperation:
$ref: '#/components/schemas/OperationBase'
UpdateAction:
Expand Down Expand Up @@ -117,12 +119,14 @@ components:
type: string
status:
description: HTTP status code returned for the operation.
type: number
type: integer
format: int32
error:
$ref: '_common.yaml#/components/schemas/ErrorCause'
_primary_term:
description: The primary term assigned to the document for the operation.
type: number
type: integer
format: int64
result:
description: |-
Result of the operation.
Expand Down
20 changes: 18 additions & 2 deletions spec/schemas/_core.explain.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,15 @@ components:
items:
$ref: '#/components/schemas/ExplanationDetail'
value:
type: number
oneOf:
- type: integer
format: int32
- type: integer
format: int64
- type: number
format: float
- type: number
format: double
required:
- description
- details
Expand All @@ -31,7 +39,15 @@ components:
items:
$ref: '#/components/schemas/ExplanationDetail'
value:
type: number
oneOf:
- type: integer
format: int32
- type: integer
format: int64
- type: number
format: float
- type: number
format: double
required:
- description
- value
Loading
Loading