@@ -157,6 +157,27 @@ describe('EPM template', () => {
157157 expect ( mappings ) . toEqual ( longWithIndexFalseMapping ) ;
158158 } ) ;
159159
160+ it ( 'tests processing keyword field with doc_values false' , ( ) => {
161+ const keywordWithIndexFalseYml = `
162+ - name: keywordIndexFalse
163+ type: keyword
164+ doc_values: false
165+ ` ;
166+ const keywordWithIndexFalseMapping = {
167+ properties : {
168+ keywordIndexFalse : {
169+ ignore_above : 1024 ,
170+ type : 'keyword' ,
171+ doc_values : false ,
172+ } ,
173+ } ,
174+ } ;
175+ const fields : Field [ ] = safeLoad ( keywordWithIndexFalseYml ) ;
176+ const processedFields = processFields ( fields ) ;
177+ const mappings = generateMappings ( processedFields ) ;
178+ expect ( mappings ) . toEqual ( keywordWithIndexFalseMapping ) ;
179+ } ) ;
180+
160181 it ( 'tests processing text field with multi fields' , ( ) => {
161182 const textWithMultiFieldsLiteralYml = `
162183- name: textWithMultiFields
@@ -378,6 +399,34 @@ describe('EPM template', () => {
378399 expect ( mappings ) . toEqual ( keywordWithMultiFieldsMapping ) ;
379400 } ) ;
380401
402+ it ( 'tests processing wildcard field with multi fields with match_only_text type' , ( ) => {
403+ const wildcardWithMultiFieldsLiteralYml = `
404+ - name: wildcardWithMultiFields
405+ type: wildcard
406+ multi_fields:
407+ - name: text
408+ type: match_only_text
409+ ` ;
410+
411+ const wildcardWithMultiFieldsMapping = {
412+ properties : {
413+ wildcardWithMultiFields : {
414+ ignore_above : 1024 ,
415+ type : 'wildcard' ,
416+ fields : {
417+ text : {
418+ type : 'match_only_text' ,
419+ } ,
420+ } ,
421+ } ,
422+ } ,
423+ } ;
424+ const fields : Field [ ] = safeLoad ( wildcardWithMultiFieldsLiteralYml ) ;
425+ const processedFields = processFields ( fields ) ;
426+ const mappings = generateMappings ( processedFields ) ;
427+ expect ( mappings ) . toEqual ( wildcardWithMultiFieldsMapping ) ;
428+ } ) ;
429+
381430 it ( 'tests processing object field with no other attributes' , ( ) => {
382431 const objectFieldLiteralYml = `
383432- name: objectField
0 commit comments