File tree 1 file changed +13
-11
lines changed
rest-api-spec/src/yamlRestTest/resources/rest-api-spec/test/synonyms
1 file changed +13
-11
lines changed Original file line number Diff line number Diff line change @@ -183,19 +183,20 @@ setup:
183
183
query : salute
184
184
- match : { hits.total.value: 0 }
185
185
186
-
187
- # This is to ensure that all index shards (write and read) are available. As we won't be using synonyms API to refresh
188
- # analyzers, this can be needed in serverless.
189
- - do :
190
- cluster.health :
191
- index : .synonyms
192
- wait_for_status : green
193
-
194
186
# Reloading analyzers makes synonyms refresh
195
187
- do :
196
- indices.reload_search_analyzers :
197
- index : my_index1
198
- - length : { reload_details: 1 }
188
+ synonyms.put_synonym :
189
+ id : synonyms_set1
190
+ refresh : true
191
+ body :
192
+ synonyms_set :
193
+ - synonyms : " hello, salute"
194
+ - synonyms : " ciao => goodbye"
195
+
196
+ - match : { result: "updated" }
197
+ - gt : { reload_analyzers_details._shards.total: 0 }
198
+ - gt : { reload_analyzers_details._shards.successful: 0 }
199
+ - length : { reload_analyzers_details.reload_details: 1 }
199
200
200
201
- do :
201
202
search :
@@ -205,5 +206,6 @@ setup:
205
206
match :
206
207
my_field :
207
208
query : salute
209
+
208
210
- match : { hits.total.value: 1 }
209
211
You can’t perform that action at this time.
0 commit comments