|
1 | | ---- |
2 | | -"Reload analyzers for specific synonym set": |
| 1 | +setup: |
3 | 2 | - requires: |
4 | 3 | cluster_features: ["gte_v8.10.0"] |
5 | 4 | reason: Reloading analyzers for specific synonym set is introduced in 8.10.0 |
| 5 | + |
6 | 6 | # Create synonyms_set1 |
7 | 7 | - do: |
8 | 8 | synonyms.put_synonym: |
|
100 | 100 | - '{"index": {"_index": "my_index2", "_id": "2"}}' |
101 | 101 | - '{"my_field": "goodbye"}' |
102 | 102 |
|
103 | | - # An update of synonyms_set1 must trigger auto-reloading of analyzers only for synonyms_set1 |
| 103 | +--- |
| 104 | +"Reload analyzers for specific synonym set": |
| 105 | +# These specific tests can't succeed in BwC, as synonyms auto-expand replicas are 0-all. Replicas can't be associated to |
| 106 | +# upgraded nodes, and thus we are not able to guarantee that the shards are not failed. |
| 107 | +# This test is skipped for BwC until synonyms index has auto-exapnd replicas set to 0-1. |
| 108 | + |
104 | 109 | - do: |
105 | 110 | synonyms.put_synonym: |
106 | 111 | id: synonyms_set1 |
107 | 112 | body: |
108 | 113 | synonyms_set: |
109 | 114 | - synonyms: "hello, salute" |
110 | 115 | - synonyms: "ciao => goodbye" |
| 116 | + |
111 | 117 | - match: { result: "updated" } |
112 | 118 | - gt: { reload_analyzers_details._shards.total: 0 } |
113 | 119 | - gt: { reload_analyzers_details._shards.successful: 0 } |
114 | 120 | - match: { reload_analyzers_details._shards.failed: 0 } |
115 | | - - length: { reload_analyzers_details.reload_details: 1 } # reload details contain only a single index |
116 | | - - match: { reload_analyzers_details.reload_details.0.index: "my_index1" } |
117 | | - - match: { reload_analyzers_details.reload_details.0.reloaded_analyzers.0: "my_analyzer1" } |
| 121 | + |
118 | 122 |
|
119 | 123 | # Confirm that the index analyzers are reloaded for my_index1 |
120 | 124 | - do: |
|
127 | 131 | query: salute |
128 | 132 | - match: { hits.total.value: 1 } |
129 | 133 |
|
| 134 | +--- |
| 135 | +"Check analyzer reloaded and non failed shards for bwc tests": |
| 136 | + |
| 137 | + - do: |
| 138 | + synonyms.put_synonym: |
| 139 | + id: synonyms_set1 |
| 140 | + body: |
| 141 | + synonyms_set: |
| 142 | + - synonyms: "hello, salute" |
| 143 | + - synonyms: "ciao => goodbye" |
| 144 | + - match: { result: "updated" } |
| 145 | + - gt: { reload_analyzers_details._shards.total: 0 } |
| 146 | + - gt: { reload_analyzers_details._shards.successful: 0 } |
| 147 | + - length: { reload_analyzers_details.reload_details: 1 } # reload details contain only a single index |
| 148 | + - match: { reload_analyzers_details.reload_details.0.index: "my_index1" } |
| 149 | + - match: { reload_analyzers_details.reload_details.0.reloaded_analyzers.0: "my_analyzer1" } |
| 150 | + |
130 | 151 | # Confirm that the index analyzers are still the same for my_index2 |
131 | 152 | - do: |
132 | 153 | search: |
|
0 commit comments