From 5fc6f171210ab5ace1aaf13edf8e9d33862bc070 Mon Sep 17 00:00:00 2001 From: Nik Everett Date: Wed, 17 May 2017 07:42:38 -0400 Subject: [PATCH] Fix new analysis-common yml tests These tests are broken because I added them with the `yml` extension and didn't realize that we weren't running tests with that extension until we merged #24659. I used that extension in anticipation of #24659 but didn't verify that the tests were actually running. Ooops! Closes #24734 --- .../test/search.query/10_match.yml | 16 +++++---- .../test/termvectors/10_payloads.yml | 36 +++++++++---------- 2 files changed, 27 insertions(+), 25 deletions(-) diff --git a/modules/analysis-common/src/test/resources/rest-api-spec/test/search.query/10_match.yml b/modules/analysis-common/src/test/resources/rest-api-spec/test/search.query/10_match.yml index d07e06865a1..fca70a57697 100644 --- a/modules/analysis-common/src/test/resources/rest-api-spec/test/search.query/10_match.yml +++ b/modules/analysis-common/src/test/resources/rest-api-spec/test/search.query/10_match.yml @@ -25,7 +25,7 @@ mappings: doc: properties: - body: + text: type: text analyzer: index search_analyzer: search @@ -43,9 +43,10 @@ body: query: match: - text: fox runs - operator: AND - - match: {hits.count: 1} + text: + query: fox runs + operator: AND + - match: {hits.total: 1} - do: index: @@ -60,6 +61,7 @@ body: query: match: - text: fox runs - operator: AND - - match: {hits.count: 2} + text: + query: fox runs + operator: AND + - match: {hits.total: 2} diff --git a/modules/analysis-common/src/test/resources/rest-api-spec/test/termvectors/10_payloads.yml b/modules/analysis-common/src/test/resources/rest-api-spec/test/termvectors/10_payloads.yml index d0e31758340..489b55a63cd 100644 --- a/modules/analysis-common/src/test/resources/rest-api-spec/test/termvectors/10_payloads.yml +++ b/modules/analysis-common/src/test/resources/rest-api-spec/test/termvectors/10_payloads.yml @@ -3,23 +3,23 @@ # because there are no token filters that support payloads in core. - do: indices.create: - index: test - body: - mappings: - doc: - properties: - text: - type: text - term_vector: with_positions_offsets_payloads - analyzer: has_payloads - settings: - number_of_shards: 1 - number_of_replicas: 1 - analysis: - analyzer: - had_payloads: - tokenizer: standard - filter: [type_as_payload] + index: test + body: + settings: + number_of_shards: 1 + number_of_replicas: 1 + analysis: + analyzer: + has_payloads: + tokenizer: standard + filter: [type_as_payload] + mappings: + doc: + properties: + text: + type: text + term_vector: with_positions_offsets_payloads + analyzer: has_payloads - do: index: @@ -37,4 +37,4 @@ id: 1 payloads: true - match: {term_vectors.text.field_statistics.sum_doc_freq: 5} - - match: {term_vectors.text.terms.brown.tokens.0.payload: 10} + - match: {term_vectors.text.terms.brown.tokens.0.payload: PEFMUEhBTlVNPg==}