Skip to content

Commit

Permalink
added type for term vectors, fixing lint
Browse files Browse the repository at this point in the history
Signed-off-by: Tokesh <[email protected]>
  • Loading branch information
Tokesh committed Dec 15, 2024
1 parent 2e8d4b5 commit 38458e8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- Added response schema for `PUT` and `DELETE /_plugins/_transform/{id}` ([#722](https://github.com/opensearch-project/opensearch-api-specification/pull/716))
- Added response schema for `GET /_plugins/_knn/warmup/{index}` ([#717](https://github.com/opensearch-project/opensearch-api-specification/pull/717))
- Added support for multiple test verbs ([#724](https://github.com/opensearch-project/opensearch-api-specification/pull/724))
- Added `_type` to `term_vector` API specs ([#734](https://github.com/opensearch-project/opensearch-api-specification/pull/734))

### Removed
- Removed unsupported `_common.mapping:SourceField`'s `mode` field and associated `_common.mapping:SourceFieldMode` enum ([#652](https://github.com/opensearch-project/opensearch-api-specification/pull/652))
Expand Down
2 changes: 2 additions & 0 deletions spec/namespaces/_core.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3341,6 +3341,8 @@ components:
format: int64
_version:
$ref: '../schemas/_common.yaml#/components/schemas/VersionNumber'
_type:
$ref: '_common.yaml#/components/schemas/Type'
required:
- _index
- _version
Expand Down
14 changes: 7 additions & 7 deletions tests/default/indices/term_vectors.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ prologues:
author:
type: text
title:
term_vector: "yes"
term_vector: yes
type: text
year:
type: integer
Expand All @@ -23,9 +23,9 @@ prologues:
content_type: application/x-ndjson
payload:
- {create: {_index: books, _id: book1}}
- {author: "Harper Lee", title: "To Kill a Mockingbird", year: 1960}
- {author: Harper Lee, title: To Kill a Mockingbird, year: 1960}
- {create: {_index: books, _id: book2}}
- {author: "Elizabeth Rudnick", title: "Beauty and the Beast", year: 1991}
- {author: Elizabeth Rudnick, title: Beauty and the Beast, year: 1991}
epilogues:
- path: /books
method: DELETE
Expand All @@ -40,7 +40,7 @@ chapters:
request:
payload:
doc:
title: "To kill"
title: To kill
response:
status: 200
- synopsis: Get term vectors for a specific index (POST).
Expand All @@ -51,22 +51,22 @@ chapters:
request:
payload:
doc:
title: "Analyzing termvectors"
title: Analyzing termvectors
response:
status: 200
- synopsis: Get term vectors for a document by its ID.
path: /{index}/_termvectors/{id}
parameters:
index: books
id: "book1"
id: book1
method: GET
response:
status: 200
- synopsis: Get term vectors for a document by its ID (POST).
path: /{index}/_termvectors/{id}
parameters:
index: books
id: "book2"
id: book2
method: POST
response:
status: 200
Expand Down

0 comments on commit 38458e8

Please sign in to comment.