@@ -489,8 +489,7 @@ public void testRecoverySourceWithSyntheticSource() throws IOException {
489489 MapperService mapperService = createMapperService (settings , topMapping (b -> {}));
490490 DocumentMapper docMapper = mapperService .documentMapper ();
491491 ParsedDocument doc = docMapper .parse (source (b -> b .field ("field1" , "value1" )));
492- assertNotNull (doc .rootDoc ().getField ("_recovery_source" ));
493- assertThat (doc .rootDoc ().getField ("_recovery_source" ).binaryValue (), equalTo (new BytesRef ("{\" field1\" :\" value1\" }" )));
492+ assertNull (doc .rootDoc ().getField ("_recovery_source" ));
494493 }
495494 {
496495 Settings settings = Settings .builder ()
@@ -521,8 +520,8 @@ public void testRecoverySourceWithLogs() throws IOException {
521520 MapperService mapperService = createMapperService (settings , mapping (b -> {}));
522521 DocumentMapper docMapper = mapperService .documentMapper ();
523522 ParsedDocument doc = docMapper .parse (source (b -> { b .field ("@timestamp" , "2012-02-13" ); }));
524- assertNotNull (doc .rootDoc ().getField ("_recovery_source " ));
525- assertThat (doc .rootDoc ().getField ("_recovery_source " ).binaryValue (), equalTo (new BytesRef ( "{ \" @timestamp \" : \" 2012-02-13 \" }" ) ));
523+ assertNotNull (doc .rootDoc ().getField ("_recovery_source_size " ));
524+ assertThat (doc .rootDoc ().getField ("_recovery_source_size " ).numericValue (), equalTo (27L ));
526525 }
527526 {
528527 Settings settings = Settings .builder ()
@@ -715,8 +714,7 @@ public void testRecoverySourceWithLogsCustom() throws IOException {
715714 MapperService mapperService = createMapperService (settings , mappings );
716715 DocumentMapper docMapper = mapperService .documentMapper ();
717716 ParsedDocument doc = docMapper .parse (source (b -> { b .field ("@timestamp" , "2012-02-13" ); }));
718- assertNotNull (doc .rootDoc ().getField ("_recovery_source" ));
719- assertThat (doc .rootDoc ().getField ("_recovery_source" ).binaryValue (), equalTo (new BytesRef ("{\" @timestamp\" :\" 2012-02-13\" }" )));
717+ assertNull (doc .rootDoc ().getField ("_recovery_source" ));
720718 }
721719 {
722720 Settings settings = Settings .builder ()
@@ -742,11 +740,7 @@ public void testRecoverySourceWithTimeSeries() throws IOException {
742740 }));
743741 DocumentMapper docMapper = mapperService .documentMapper ();
744742 ParsedDocument doc = docMapper .parse (source ("123" , b -> b .field ("@timestamp" , "2012-02-13" ).field ("field" , "value1" ), null ));
745- assertNotNull (doc .rootDoc ().getField ("_recovery_source" ));
746- assertThat (
747- doc .rootDoc ().getField ("_recovery_source" ).binaryValue (),
748- equalTo (new BytesRef ("{\" @timestamp\" :\" 2012-02-13\" ,\" field\" :\" value1\" }" ))
749- );
743+ assertNull (doc .rootDoc ().getField ("_recovery_source" ));
750744 }
751745 {
752746 Settings settings = Settings .builder ()
@@ -790,11 +784,7 @@ public void testRecoverySourceWithTimeSeriesCustom() throws IOException {
790784 MapperService mapperService = createMapperService (settings , mappings );
791785 DocumentMapper docMapper = mapperService .documentMapper ();
792786 ParsedDocument doc = docMapper .parse (source ("123" , b -> b .field ("@timestamp" , "2012-02-13" ).field ("field" , "value1" ), null ));
793- assertNotNull (doc .rootDoc ().getField ("_recovery_source" ));
794- assertThat (
795- doc .rootDoc ().getField ("_recovery_source" ).binaryValue (),
796- equalTo (new BytesRef ("{\" @timestamp\" :\" 2012-02-13\" ,\" field\" :\" value1\" }" ))
797- );
787+ assertNull (doc .rootDoc ().getField ("_recovery_source" ));
798788 }
799789 {
800790 Settings settings = Settings .builder ()
0 commit comments