@@ -57,7 +57,7 @@ public void testSingleLevel() throws Exception {
5757 .endObject ().string ();
5858 IndexService service = createIndex ("test" );
5959 DocumentMapper docMapper = service .mapperService ().merge ("type" , new CompressedXContent (mapping ),
60- MapperService .MergeReason .MAPPING_UPDATE , false );
60+ MapperService .MergeReason .MAPPING_UPDATE );
6161 assertTrue (docMapper .mappers ().getMapper ("join_field" ) == ParentJoinFieldMapper .getMapper (service .mapperService ()));
6262
6363 // Doc without join
@@ -106,7 +106,7 @@ public void testParentIdSpecifiedAsNumber() throws Exception {
106106 .endObject ().string ();
107107 IndexService service = createIndex ("test" );
108108 DocumentMapper docMapper = service .mapperService ().merge ("type" , new CompressedXContent (mapping ),
109- MapperService .MergeReason .MAPPING_UPDATE , false );
109+ MapperService .MergeReason .MAPPING_UPDATE );
110110 ParsedDocument doc = docMapper .parse (SourceToParse .source ("test" , "type" , "2" ,
111111 XContentFactory .jsonBuilder ().startObject ()
112112 .startObject ("join_field" )
@@ -141,7 +141,7 @@ public void testMultipleLevels() throws Exception {
141141 .endObject ().string ();
142142 IndexService service = createIndex ("test" );
143143 DocumentMapper docMapper = service .mapperService ().merge ("type" , new CompressedXContent (mapping ),
144- MapperService .MergeReason .MAPPING_UPDATE , false );
144+ MapperService .MergeReason .MAPPING_UPDATE );
145145 assertTrue (docMapper .mappers ().getMapper ("join_field" ) == ParentJoinFieldMapper .getMapper (service .mapperService ()));
146146
147147 // Doc without join
@@ -221,7 +221,7 @@ public void testUpdateRelations() throws Exception {
221221 .endObject ().endObject ().string ();
222222 IndexService indexService = createIndex ("test" );
223223 DocumentMapper docMapper = indexService .mapperService ().merge ("type" , new CompressedXContent (mapping ),
224- MapperService .MergeReason .MAPPING_UPDATE , false );
224+ MapperService .MergeReason .MAPPING_UPDATE );
225225 assertTrue (docMapper .mappers ().getMapper ("join_field" ) == ParentJoinFieldMapper .getMapper (indexService .mapperService ()));
226226
227227 {
@@ -235,7 +235,7 @@ public void testUpdateRelations() throws Exception {
235235 .endObject ().endObject ().string ();
236236 IllegalStateException exc = expectThrows (IllegalStateException .class ,
237237 () -> indexService .mapperService ().merge ("type" , new CompressedXContent (updateMapping ),
238- MapperService .MergeReason .MAPPING_UPDATE , false ));
238+ MapperService .MergeReason .MAPPING_UPDATE ));
239239 assertThat (exc .getMessage (), containsString ("cannot remove parent [parent] in join field [join_field]" ));
240240 }
241241
@@ -251,7 +251,7 @@ public void testUpdateRelations() throws Exception {
251251 .endObject ().endObject ().string ();
252252 IllegalStateException exc = expectThrows (IllegalStateException .class ,
253253 () -> indexService .mapperService ().merge ("type" , new CompressedXContent (updateMapping ),
254- MapperService .MergeReason .MAPPING_UPDATE , false ));
254+ MapperService .MergeReason .MAPPING_UPDATE ));
255255 assertThat (exc .getMessage (), containsString ("cannot remove child [grand_child2] in join field [join_field]" ));
256256 }
257257
@@ -268,7 +268,7 @@ public void testUpdateRelations() throws Exception {
268268 .endObject ().endObject ().string ();
269269 IllegalStateException exc = expectThrows (IllegalStateException .class ,
270270 () -> indexService .mapperService ().merge ("type" , new CompressedXContent (updateMapping ),
271- MapperService .MergeReason .MAPPING_UPDATE , false ));
271+ MapperService .MergeReason .MAPPING_UPDATE ));
272272 assertThat (exc .getMessage (), containsString ("cannot create child [parent] from an existing parent" ));
273273 }
274274
@@ -285,7 +285,7 @@ public void testUpdateRelations() throws Exception {
285285 .endObject ().endObject ().string ();
286286 IllegalStateException exc = expectThrows (IllegalStateException .class ,
287287 () -> indexService .mapperService ().merge ("type" , new CompressedXContent (updateMapping ),
288- MapperService .MergeReason .MAPPING_UPDATE , false ));
288+ MapperService .MergeReason .MAPPING_UPDATE ));
289289 assertThat (exc .getMessage (), containsString ("cannot create parent [grand_child2] from an existing child]" ));
290290 }
291291
@@ -300,7 +300,7 @@ public void testUpdateRelations() throws Exception {
300300 .endObject ()
301301 .endObject ().endObject ().string ();
302302 docMapper = indexService .mapperService ().merge ("type" , new CompressedXContent (updateMapping ),
303- MapperService .MergeReason .MAPPING_UPDATE , true );
303+ MapperService .MergeReason .MAPPING_UPDATE );
304304 assertTrue (docMapper .mappers ().getMapper ("join_field" ) == ParentJoinFieldMapper .getMapper (indexService .mapperService ()));
305305 ParentJoinFieldMapper mapper = ParentJoinFieldMapper .getMapper (indexService .mapperService ());
306306 assertTrue (mapper .hasChild ("child2" ));
@@ -321,7 +321,7 @@ public void testUpdateRelations() throws Exception {
321321 .endObject ()
322322 .endObject ().endObject ().string ();
323323 docMapper = indexService .mapperService ().merge ("type" , new CompressedXContent (updateMapping ),
324- MapperService .MergeReason .MAPPING_UPDATE , true );
324+ MapperService .MergeReason .MAPPING_UPDATE );
325325 assertTrue (docMapper .mappers ().getMapper ("join_field" ) == ParentJoinFieldMapper .getMapper (indexService .mapperService ()));
326326 ParentJoinFieldMapper mapper = ParentJoinFieldMapper .getMapper (indexService .mapperService ());
327327 assertTrue (mapper .hasParent ("other" ));
@@ -349,7 +349,7 @@ public void testInvalidJoinFieldInsideObject() throws Exception {
349349 IndexService indexService = createIndex ("test" );
350350 MapperParsingException exc = expectThrows (MapperParsingException .class ,
351351 () -> indexService .mapperService ().merge ("type" , new CompressedXContent (mapping ),
352- MapperService .MergeReason .MAPPING_UPDATE , false ));
352+ MapperService .MergeReason .MAPPING_UPDATE ));
353353 assertThat (exc .getRootCause ().getMessage (),
354354 containsString ("join field [object.join_field] cannot be added inside an object or in a multi-field" ));
355355 }
@@ -371,7 +371,7 @@ public void testInvalidJoinFieldInsideMultiFields() throws Exception {
371371 IndexService indexService = createIndex ("test" );
372372 MapperParsingException exc = expectThrows (MapperParsingException .class ,
373373 () -> indexService .mapperService ().merge ("type" , new CompressedXContent (mapping ),
374- MapperService .MergeReason .MAPPING_UPDATE , false ));
374+ MapperService .MergeReason .MAPPING_UPDATE ));
375375 assertThat (exc .getRootCause ().getMessage (),
376376 containsString ("join field [number.join_field] cannot be added inside an object or in a multi-field" ));
377377 }
@@ -397,7 +397,7 @@ public void testMultipleJoinFields() throws Exception {
397397 .endObject ()
398398 .endObject ().string ();
399399 IllegalArgumentException exc = expectThrows (IllegalArgumentException .class , () -> indexService .mapperService ().merge ("type" ,
400- new CompressedXContent (mapping ), MapperService .MergeReason .MAPPING_UPDATE , false ));
400+ new CompressedXContent (mapping ), MapperService .MergeReason .MAPPING_UPDATE ));
401401 assertThat (exc .getMessage (), containsString ("Field [_parent_join] is defined twice in [type]" ));
402402 }
403403
@@ -414,7 +414,7 @@ public void testMultipleJoinFields() throws Exception {
414414 .endObject ()
415415 .endObject ().string ();
416416 indexService .mapperService ().merge ("type" ,
417- new CompressedXContent (mapping ), MapperService .MergeReason .MAPPING_UPDATE , false );
417+ new CompressedXContent (mapping ), MapperService .MergeReason .MAPPING_UPDATE );
418418 String updateMapping = XContentFactory .jsonBuilder ().startObject ()
419419 .startObject ("properties" )
420420 .startObject ("another_join_field" )
@@ -423,7 +423,7 @@ public void testMultipleJoinFields() throws Exception {
423423 .endObject ()
424424 .endObject ().string ();
425425 IllegalArgumentException exc = expectThrows (IllegalArgumentException .class , () -> indexService .mapperService ().merge ("type" ,
426- new CompressedXContent (updateMapping ), MapperService .MergeReason .MAPPING_UPDATE , false ));
426+ new CompressedXContent (updateMapping ), MapperService .MergeReason .MAPPING_UPDATE ));
427427 assertThat (exc .getMessage (), containsString ("Field [_parent_join] is defined twice in [type]" ));
428428 }
429429 }
@@ -442,7 +442,7 @@ public void testEagerGlobalOrdinals() throws Exception {
442442 .endObject ().string ();
443443 IndexService service = createIndex ("test" );
444444 DocumentMapper docMapper = service .mapperService ().merge ("type" , new CompressedXContent (mapping ),
445- MapperService .MergeReason .MAPPING_UPDATE , false );
445+ MapperService .MergeReason .MAPPING_UPDATE );
446446 assertTrue (docMapper .mappers ().getMapper ("join_field" ) == ParentJoinFieldMapper .getMapper (service .mapperService ()));
447447 assertFalse (service .mapperService ().fullName ("join_field" ).eagerGlobalOrdinals ());
448448 assertNotNull (service .mapperService ().fullName ("join_field#parent" ));
@@ -463,7 +463,7 @@ public void testEagerGlobalOrdinals() throws Exception {
463463 .endObject ()
464464 .endObject ().string ();
465465 service .mapperService ().merge ("type" , new CompressedXContent (mapping ),
466- MapperService .MergeReason .MAPPING_UPDATE , false );
466+ MapperService .MergeReason .MAPPING_UPDATE );
467467 assertFalse (service .mapperService ().fullName ("join_field" ).eagerGlobalOrdinals ());
468468 assertNotNull (service .mapperService ().fullName ("join_field#parent" ));
469469 assertFalse (service .mapperService ().fullName ("join_field#parent" ).eagerGlobalOrdinals ());
0 commit comments