@@ -138,6 +138,270 @@ keyword with normalizer:
138138 keyword_with_ignore_above : [ "May the FORCE be with You!", "Do or Do Not, There is no Try" ]
139139 keyword_without_doc_values : [ "May the FORCE be with You!", "Do or Do Not, There is no Try" ]
140140
141+ ---
142+ keyword with non-lowercase normalizer :
143+ - do :
144+ indices.create :
145+ index : test-keyword-with-normalizer
146+ body :
147+ settings :
148+ analysis :
149+ normalizer :
150+ test_normalizer :
151+ type : custom
152+ filter :
153+ - asciifolding
154+ - uppercase
155+ index :
156+ mapping.source.mode : synthetic
157+ mappings :
158+ properties :
159+ keyword :
160+ type : keyword
161+ normalizer : test_normalizer
162+ keyword_with_skip_store :
163+ type : keyword
164+ normalizer : test_normalizer
165+ normalizer_skip_store_original_value : true
166+ keyword_with_ignore_above :
167+ type : keyword
168+ normalizer : test_normalizer
169+ ignore_above : 10
170+ keyword_without_doc_values :
171+ type : keyword
172+ normalizer : test_normalizer
173+ doc_values : false
174+
175+ - do :
176+ index :
177+ index : test-keyword-with-normalizer
178+ id : 1
179+ body :
180+ keyword : " the Quìck Brøwn Fox jumps over the låzy Dog"
181+ keyword_with_skip_store : " the Quìck Brøwn Fox jumps over the låzy Dog"
182+ keyword_with_ignore_above : " the Quìck Brøwn Fox jumps over the låzy Dog"
183+ keyword_without_doc_values : " the Quìck Brøwn Fox jumps over the låzy Dog"
184+
185+ - do :
186+ index :
187+ index : test-keyword-with-normalizer
188+ id : 2
189+ body :
190+ keyword : " The five BØXING wìzårds jümp Quickly"
191+ keyword_with_skip_store : " The five BØXING wìzårds jümp Quickly"
192+ keyword_with_ignore_above : " The five BØXING wìzårds jümp Quickly"
193+ keyword_without_doc_values : " The five BØXING wìzårds jümp Quickly"
194+
195+ - do :
196+ index :
197+ index : test-keyword-with-normalizer
198+ id : 3
199+ body :
200+ keyword : [ "Mây the FORCE bè with Yoü!", "Do or Do Not, There is no Try" ]
201+ keyword_with_skip_store : [ "Mây the FORCE bè with Yoü!", "Do or Do Not, There is no Try" ]
202+ keyword_with_ignore_above : [ "Mây the FORCE bè with Yoü!", "Do or Do Not, There is no Try" ]
203+ keyword_without_doc_values : [ "Mây the FORCE bè with Yoü!", "Do or Do Not, There is no Try" ]
204+
205+ - do :
206+ mget :
207+ index : test-keyword-with-normalizer
208+ body :
209+ ids : [ 1, 2, 3 ]
210+ - match : { docs.0._index: "test-keyword-with-normalizer" }
211+ - match : { docs.0._id: "1" }
212+ - match :
213+ docs.0._source :
214+ keyword : " the Quìck Brøwn Fox jumps over the låzy Dog"
215+ keyword_with_skip_store : " THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG"
216+ keyword_with_ignore_above : " the Quìck Brøwn Fox jumps over the låzy Dog"
217+ keyword_without_doc_values : " the Quìck Brøwn Fox jumps over the låzy Dog"
218+
219+ - match : { docs.1._index: "test-keyword-with-normalizer" }
220+ - match : { docs.1._id: "2" }
221+ - match :
222+ docs.1._source :
223+ keyword : " The five BØXING wìzårds jümp Quickly"
224+ keyword_with_skip_store : " THE FIVE BOXING WIZARDS JUMP QUICKLY"
225+ keyword_with_ignore_above : " The five BØXING wìzårds jümp Quickly"
226+ keyword_without_doc_values : " The five BØXING wìzårds jümp Quickly"
227+
228+ - match : { docs.2._index: "test-keyword-with-normalizer" }
229+ - match : { docs.2._id: "3" }
230+ - match :
231+ docs.2._source :
232+ keyword : [ "Mây the FORCE bè with Yoü!", "Do or Do Not, There is no Try" ]
233+ keyword_with_skip_store : [ "DO OR DO NOT, THERE IS NO TRY", "MAY THE FORCE BE WITH YOU!" ]
234+ keyword_with_ignore_above : [ "Mây the FORCE bè with Yoü!", "Do or Do Not, There is no Try" ]
235+ keyword_without_doc_values : [ "Mây the FORCE bè with Yoü!", "Do or Do Not, There is no Try" ]
236+
237+ ---
238+ keyword with normalizer and skip store original value :
239+ - do :
240+ indices.create :
241+ index : test-keyword-with-normalizer
242+ body :
243+ settings :
244+ analysis :
245+ normalizer :
246+ lowercase :
247+ type : custom
248+ filter :
249+ - lowercase
250+ index :
251+ mapping.source.mode : synthetic
252+ mappings :
253+ properties :
254+ keyword :
255+ type : keyword
256+ normalizer : lowercase
257+ normalizer_skip_store_original_value : true
258+ keyword_with_ignore_above :
259+ type : keyword
260+ normalizer : lowercase
261+ normalizer_skip_store_original_value : true
262+ ignore_above : 10
263+ keyword_without_doc_values :
264+ type : keyword
265+ normalizer : lowercase
266+ normalizer_skip_store_original_value : true
267+ doc_values : false
268+
269+ - do :
270+ index :
271+ index : test-keyword-with-normalizer
272+ id : 1
273+ body :
274+ keyword : " the quick brown fox jumps over the lazy dog"
275+ keyword_with_ignore_above : " the Quick Brown Fox jumps over the lazy Dog"
276+ keyword_without_doc_values : " the Quick Brown Fox jumps over the lazy Dog"
277+
278+ - do :
279+ index :
280+ index : test-keyword-with-normalizer
281+ id : 2
282+ body :
283+ keyword : " the five boxing wizards jump quickly"
284+ keyword_with_ignore_above : " The five BOXING wizards jump Quickly"
285+ keyword_without_doc_values : " The five BOXING wizards jump Quickly"
286+
287+ - do :
288+ index :
289+ index : test-keyword-with-normalizer
290+ id : 3
291+ body :
292+ keyword : [ "may the force be with you!", "do or do not, there is no try" ]
293+ keyword_with_ignore_above : [ "May the FORCE be with You!", "Do or Do Not, There is no Try" ]
294+ keyword_without_doc_values : [ "May the FORCE be with You!", "Do or Do Not, There is no Try" ]
295+
296+ - do :
297+ mget :
298+ index : test-keyword-with-normalizer
299+ body :
300+ ids : [ 1, 2, 3 ]
301+ - match : { docs.0._index: "test-keyword-with-normalizer" }
302+ - match : { docs.0._id: "1" }
303+ - match :
304+ docs.0._source :
305+ keyword : " the quick brown fox jumps over the lazy dog"
306+ keyword_with_ignore_above : " the Quick Brown Fox jumps over the lazy Dog"
307+ keyword_without_doc_values : " the Quick Brown Fox jumps over the lazy Dog"
308+
309+ - match : { docs.1._index: "test-keyword-with-normalizer" }
310+ - match : { docs.1._id: "2" }
311+ - match :
312+ docs.1._source :
313+ keyword : " the five boxing wizards jump quickly"
314+ keyword_with_ignore_above : " The five BOXING wizards jump Quickly"
315+ keyword_without_doc_values : " The five BOXING wizards jump Quickly"
316+
317+ - match : { docs.2._index: "test-keyword-with-normalizer" }
318+ - match : { docs.2._id: "3" }
319+ - match :
320+ docs.2._source :
321+ keyword : [ "do or do not, there is no try", "may the force be with you!" ]
322+ keyword_with_ignore_above : [ "May the FORCE be with You!", "Do or Do Not, There is no Try" ]
323+ keyword_without_doc_values : [ "May the FORCE be with You!", "Do or Do Not, There is no Try" ]
324+
325+ ---
326+
327+ keyword with built-in normalizer :
328+ - do :
329+ indices.create :
330+ index : test-keyword-with-normalizer
331+ body :
332+ settings :
333+ index :
334+ mapping.source.mode : synthetic
335+ mappings :
336+ properties :
337+ keyword :
338+ type : keyword
339+ normalizer : lowercase
340+ keyword_with_ignore_above :
341+ type : keyword
342+ normalizer : lowercase
343+ ignore_above : 10
344+ keyword_without_doc_values :
345+ type : keyword
346+ normalizer : lowercase
347+ doc_values : false
348+
349+ - do :
350+ index :
351+ index : test-keyword-with-normalizer
352+ id : 1
353+ body :
354+ keyword : " the quick brown fox jumps over the lazy dog"
355+ keyword_with_ignore_above : " the Quick Brown Fox jumps over the lazy Dog"
356+ keyword_without_doc_values : " the Quick Brown Fox jumps over the lazy Dog"
357+
358+ - do :
359+ index :
360+ index : test-keyword-with-normalizer
361+ id : 2
362+ body :
363+ keyword : " the five boxing wizards jump quickly"
364+ keyword_with_ignore_above : " The five BOXING wizards jump Quickly"
365+ keyword_without_doc_values : " The five BOXING wizards jump Quickly"
366+
367+ - do :
368+ index :
369+ index : test-keyword-with-normalizer
370+ id : 3
371+ body :
372+ keyword : [ "may the force be with you!", "do or do not, there is no try" ]
373+ keyword_with_ignore_above : [ "May the FORCE be with You!", "Do or Do Not, There is no Try" ]
374+ keyword_without_doc_values : [ "May the FORCE be with You!", "Do or Do Not, There is no Try" ]
375+
376+ - do :
377+ mget :
378+ index : test-keyword-with-normalizer
379+ body :
380+ ids : [ 1, 2, 3 ]
381+ - match : { docs.0._index: "test-keyword-with-normalizer" }
382+ - match : { docs.0._id: "1" }
383+ - match :
384+ docs.0._source :
385+ keyword : " the quick brown fox jumps over the lazy dog"
386+ keyword_with_ignore_above : " the Quick Brown Fox jumps over the lazy Dog"
387+ keyword_without_doc_values : " the Quick Brown Fox jumps over the lazy Dog"
388+
389+ - match : { docs.1._index: "test-keyword-with-normalizer" }
390+ - match : { docs.1._id: "2" }
391+ - match :
392+ docs.1._source :
393+ keyword : " the five boxing wizards jump quickly"
394+ keyword_with_ignore_above : " The five BOXING wizards jump Quickly"
395+ keyword_without_doc_values : " The five BOXING wizards jump Quickly"
396+
397+ - match : { docs.2._index: "test-keyword-with-normalizer" }
398+ - match : { docs.2._id: "3" }
399+ - match :
400+ docs.2._source :
401+ keyword : [ "do or do not, there is no try", "may the force be with you!" ]
402+ keyword_with_ignore_above : [ "May the FORCE be with You!", "Do or Do Not, There is no Try" ]
403+ keyword_without_doc_values : [ "May the FORCE be with You!", "Do or Do Not, There is no Try" ]
404+
141405---
142406stored text :
143407 - requires :
0 commit comments