@@ -383,3 +383,52 @@ setup:
383383 - not_exists : fields.dense_field.inference.chunks.offset
384384 - not_exists : fields.dense_field.inference.chunks
385385 - not_exists : fields.dense_field.inference
386+
387+ ---
388+ " Field caps does not exclude multi-fields under semantic_text " :
389+ - requires :
390+ cluster_features : " semantic_text.exclude_sub_fields_from_field_caps"
391+ reason : field caps api exclude semantic_text subfields from 9.1.0 & 8.19.0
392+ - do :
393+ indices.create :
394+ index : test-multi-field-index
395+ body :
396+ settings :
397+ index :
398+ mapping :
399+ semantic_text :
400+ use_legacy_format : false
401+ mappings :
402+ properties :
403+ sparse_field :
404+ type : semantic_text
405+ inference_id : sparse-inference-id
406+ fields :
407+ sparse_keyword_field :
408+ type : keyword
409+ dense_field :
410+ type : semantic_text
411+ inference_id : dense-inference-id
412+ fields :
413+ dense_keyword_field :
414+ type : keyword
415+
416+ - do :
417+ field_caps :
418+ include_empty_fields : true
419+ index : test-multi-field-index
420+ fields : " *"
421+
422+ - match : { indices: [ "test-multi-field-index" ] }
423+ - exists : fields.sparse_field
424+ - exists : fields.dense_field
425+ - exists : fields.sparse_field.sparse_keyword_field
426+ - exists : fields.dense_field.dense_keyword_field
427+ - not_exists : fields.sparse_field.inference.chunks.embeddings
428+ - not_exists : fields.sparse_field.inference.chunks.offset
429+ - not_exists : fields.sparse_field.inference.chunks
430+ - not_exists : fields.sparse_field.inference
431+ - not_exists : fields.dense_field.inference.chunks.embeddings
432+ - not_exists : fields.dense_field.inference.chunks.offset
433+ - not_exists : fields.dense_field.inference.chunks
434+ - not_exists : fields.dense_field.inference
0 commit comments