File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
test/framework/src/main/java/org/elasticsearch/logsdb/datageneration Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -101,11 +101,6 @@ private void generateMapping(
101101 }
102102
103103 if (templateEntry instanceof Template .Leaf leaf ) {
104- // For simplicity we only copy to keyword fields, synthetic source logic to handle copy_to is generic.
105- if (leaf .type () == FieldType .KEYWORD ) {
106- context .addCopyToCandidate (fieldName );
107- }
108-
109104 var mappingParametersGenerator = specification .dataSource ()
110105 .get (
111106 new DataSourceRequest .LeafMappingParametersGenerator (
@@ -120,6 +115,11 @@ private void generateMapping(
120115 mappingParameters .put ("type" , leaf .type ().toString ());
121116 mappingParameters .putAll (mappingParametersGenerator .get ());
122117
118+ // For simplicity we only copy to keyword fields, synthetic source logic to handle copy_to is generic.
119+ if (leaf .type () == FieldType .KEYWORD ) {
120+ context .addCopyToCandidate (fieldName );
121+ }
122+
123123 } else if (templateEntry instanceof Template .Object object ) {
124124 var mappingParametersGenerator = specification .dataSource ()
125125 .get (new DataSourceRequest .ObjectMappingParametersGenerator (false , object .nested (), context .parentSubobjects ()))
You can’t perform that action at this time.
0 commit comments