@@ -80,7 +80,7 @@ private static IngesterOperation createOperation(BulkOperation operation, JsonpM
80
80
BinaryData binaryDoc = BinaryData .of (create .document (), mapper );
81
81
size += binaryDoc .size ();
82
82
newOperation = BulkOperation .of (bo -> bo .create (idx -> {
83
- copyBaseProperties (create , idx );
83
+ copyCreateProperties (create , idx );
84
84
return idx .document (binaryDoc );
85
85
}));
86
86
}
@@ -102,7 +102,7 @@ private static IngesterOperation indexOperation(BulkOperation operation, JsonpMa
102
102
BinaryData binaryDoc = BinaryData .of (index .document (), mapper );
103
103
size += binaryDoc .size ();
104
104
newOperation = BulkOperation .of (bo -> bo .index (idx -> {
105
- copyBaseProperties (index , idx );
105
+ copyIndexProperties (index , idx );
106
106
return idx .document (binaryDoc );
107
107
}));
108
108
}
@@ -154,6 +154,18 @@ private static void copyBaseProperties(BulkOperationBase op, BulkOperationBase.A
154
154
.versionType (op .versionType ());
155
155
}
156
156
157
+ private static void copyIndexProperties (IndexOperation <?> op , IndexOperation .Builder <?> builder ) {
158
+ copyBaseProperties (op , builder );
159
+ builder .pipeline (op .pipeline ());
160
+ builder .requireAlias (op .requireAlias ());
161
+ }
162
+
163
+ private static void copyCreateProperties (CreateOperation <?> op , CreateOperation .Builder <?> builder ) {
164
+ copyBaseProperties (op , builder );
165
+ builder .pipeline (op .pipeline ());
166
+ builder .requireAlias (op .requireAlias ());
167
+ }
168
+
157
169
private static int size (String name , @ Nullable Boolean value ) {
158
170
if (value != null ) {
159
171
return name .length () + 12 ; // 12 added chars for "name":"false",
0 commit comments