forked from elastic/elasticsearch
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add synonyms sets information to cluster stats (elastic#97900)
- Loading branch information
1 parent
c848f31
commit c0a99ba
Showing
8 changed files
with
458 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
106 changes: 106 additions & 0 deletions
106
...rc/yamlRestTest/resources/rest-api-spec/test/cluster.stats/20_analysis_stats_synonyms.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
--- | ||
"get cluster stats returns synonym sets stats": | ||
|
||
- skip: | ||
version: " - 8.9.99" | ||
reason: "synonym sets stats are added for v8.10.0" | ||
|
||
- do: | ||
cluster.stats: {} | ||
|
||
- length: { indices.analysis.synonyms: 0 } | ||
|
||
- do: | ||
indices.create: | ||
index: test-index1 | ||
body: | ||
settings: | ||
analysis: | ||
filter: | ||
bigram_max_size: | ||
type: length | ||
max: 16 | ||
min: 0 | ||
synonyms_inline_filter: | ||
type: synonym | ||
synonyms: ["foo bar", "bar => baz"] | ||
|
||
other_inline_filter: | ||
type: synonym | ||
synonyms: ["foo bar baz"] | ||
|
||
synonyms_path_filter: | ||
type: synonym | ||
synonyms_path: "/a/reused/path" | ||
|
||
other_synonyms_path_filter: | ||
type: synonym_graph | ||
synonyms_path: "/a/different/path" | ||
|
||
another_synonyms_path_filter: | ||
type: synonym_graph | ||
synonyms_path: "/another/different/path" | ||
|
||
synonyms_set_filter: | ||
type: synonym_graph | ||
synonyms_set: reused-synonym-set | ||
|
||
|
||
|
||
- do: | ||
indices.create: | ||
index: test-index2 | ||
body: | ||
settings: | ||
analysis: | ||
filter: | ||
en-stem-filter: | ||
name: light_english | ||
type: stemmer | ||
language: light_english | ||
|
||
other_synonyms_filter: | ||
type: synonym | ||
synonyms_set: another-synonym-set | ||
|
||
a_repeated_synonyms_set_filter: | ||
type: synonym | ||
synonyms_set: reused-synonym-set | ||
|
||
repeated_inline_filter: | ||
type: synonym | ||
synonyms: ["foo bar", "bar => baz"] | ||
|
||
|
||
|
||
- do: | ||
indices.create: | ||
index: test-index3 | ||
body: | ||
settings: | ||
analysis: | ||
filter: | ||
other_synonyms_filter: | ||
type: synonym | ||
synonyms_set: a-different-synonym-set | ||
|
||
a_repeated_synonyms_set_filter: | ||
type: synonym | ||
synonyms_set: reused-synonym-set | ||
|
||
more_inline_filter: | ||
type: synonym | ||
synonyms: ["foo bar", "bar => baz"] | ||
|
||
|
||
|
||
- do: | ||
cluster.stats: {} | ||
|
||
- length: { indices.analysis.synonyms: 3 } | ||
- match: { indices.analysis.synonyms.synonyms.count: 4 } | ||
- match: { indices.analysis.synonyms.synonyms.index_count: 3 } | ||
- match: { indices.analysis.synonyms.synonyms_path.count: 3 } | ||
- match: { indices.analysis.synonyms.synonyms_path.index_count: 1 } | ||
- match: { indices.analysis.synonyms.synonyms_set.count: 3 } | ||
- match: { indices.analysis.synonyms.synonyms_set.index_count: 3 } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.