From ad3bf79c6a20cf0d7f14d483ba4a30cd2e8b67c3 Mon Sep 17 00:00:00 2001 From: Karel Minarik <karmi@karmi.cz> Date: Thu, 25 Jul 2013 11:02:56 +0200 Subject: [PATCH] Changed the "Indices Analyze" test to better correspond with the new test structure 1. Move the "text format" test into separate file 2. Remove the "JSON format" from test names --- .../test/indices.analyze/10_analyze.yaml | 16 +++------------- .../indices.analyze/20_analyze_text_format.yaml | 9 +++++++++ 2 files changed, 12 insertions(+), 13 deletions(-) create mode 100644 rest-api-spec/test/indices.analyze/20_analyze_text_format.yaml diff --git a/rest-api-spec/test/indices.analyze/10_analyze.yaml b/rest-api-spec/test/indices.analyze/10_analyze.yaml index 0ad6865c707..8e2b32070ab 100644 --- a/rest-api-spec/test/indices.analyze/10_analyze.yaml +++ b/rest-api-spec/test/indices.analyze/10_analyze.yaml @@ -1,14 +1,5 @@ --- -"Analyze API text format": - - do: - indices.analyze: - format: text - text: tHE BLACK and white! AND red - - match: - tokens: "[black:4->9:<ALPHANUM>]\n\n4: \n[white:14->19:<ALPHANUM>]\n\n6: \n[red:25->28:<ALPHANUM>]\n" - ---- -"Analyze API JSON format": +"Basic test": - do: indices.analyze: text: Foo Bar @@ -17,7 +8,7 @@ - match: { tokens.1.token: bar } --- -"Analyze API JSON format - tokenizer and filter": +"Tokenizer and filter": - do: indices.analyze: filters: lowercase @@ -27,7 +18,7 @@ - match: { tokens.0.token: foo bar } --- -"Analyze API JSON format - index and field": +"Index and field": - do: indices.create: index: test @@ -51,4 +42,3 @@ - length: { tokens: 2 } - match: { tokens.0.token: Foo } - match: { tokens.1.token: Bar! } - diff --git a/rest-api-spec/test/indices.analyze/20_analyze_text_format.yaml b/rest-api-spec/test/indices.analyze/20_analyze_text_format.yaml new file mode 100644 index 00000000000..363030b0210 --- /dev/null +++ b/rest-api-spec/test/indices.analyze/20_analyze_text_format.yaml @@ -0,0 +1,9 @@ +--- +"Text format": + - do: + indices.analyze: + format: text + text: tHE BLACK and white! AND red + - match: + tokens: "[black:4->9:<ALPHANUM>]\n\n4: \n[white:14->19:<ALPHANUM>]\n\n6: \n[red:25->28:<ALPHANUM>]\n" +