anchor.diff:  %% Each line ends with literal '\n'
   %% @end
   %%--------------------------------------------------------------------
  --spec prepare_elasticsearch_batch(od_harvester:batch(), rejected_fields()) -> es_batch().
  +-spec prepare_elasticsearch_batch(od_harvester:batch(), {rejected_fields(), binary()}) -> es_batch().
   prepare_elasticsearch_batch(Batch, Rejected) ->
       Requests = lists:map(fun(BatchEntry) ->
           #{
  
positive.code: %% which is added to json metadata.
  %% @end
  %%--------------------------------------------------------------------
  -spec prepare_data(od_harvester:batch_entry(), rejected_fields()) -> map().
  prepare_data(BatchEntry, {RejectedFields, RejectionReason}) ->
      Payload = maps:get(<<"payload">>, BatchEntry, #{}),
      InternalParams = maps:with([<<"spaceId">>, <<"fileName">>], BatchEntry),
  
negative.code:     #{?REJECTED_METADATA_KEY => json_utils:encode(Xattrs)};
  prepare_xattrs(Xattrs, Fields) ->
      ConvertedXattrs = convert_xattrs(Xattrs),
      Re = <<(?INTERNAL_METADATA_KEY)/binary, "\\.xattrs\\.(.*)">>,
      lists:foldl(fun(RejectedField, Acc) ->
          case re:run(RejectedField, Re, [{capture, all_but_first, binary}]) of
              {match, [Field | _]} -> remove_field(split_on_dot(Field), Acc);
              _ -> Acc
          end
      end, ConvertedXattrs, Fields).
  
  
  