From 68fe9a14754718dbcabcc1188b291816b5ebe009 Mon Sep 17 00:00:00 2001 From: Tokesh Date: Sun, 15 Dec 2024 23:53:08 +0500 Subject: [PATCH] adding multi term vectors Signed-off-by: Tokesh --- tests/default/indices/mtermvectors.yaml | 59 +++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 tests/default/indices/mtermvectors.yaml diff --git a/tests/default/indices/mtermvectors.yaml b/tests/default/indices/mtermvectors.yaml new file mode 100644 index 00000000..6db843c0 --- /dev/null +++ b/tests/default/indices/mtermvectors.yaml @@ -0,0 +1,59 @@ +$schema: ../../../json_schemas/test_story.schema.yaml + +description: Test _mtermvectors APIs. +prologues: + - path: /books + method: PUT + request: + payload: + mappings: + properties: + author: + type: text + title: + term_vector: yes + type: text + year: + type: integer + - path: /_bulk + method: POST + parameters: + refresh: true + request: + content_type: application/x-ndjson + payload: + - {create: {_index: books, _id: book1}} + - {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} +epilogues: + - path: /books + method: DELETE + status: [200, 404] + +chapters: + - synopsis: Retrieve term vectors for specific documents in an index. + path: /{index}/_mtermvectors + parameters: + index: books + method: GET + request: + payload: + docs: + - _id: "book1" + - _id: "book2" + response: + status: 200 + + - synopsis: Retrieve term vectors for specific documents in an index (POST). + path: /{index}/_mtermvectors + parameters: + index: books + method: POST + request: + payload: + docs: + - _id: "book1" + - _id: "book2" + response: + status: 200