anchor.diff:      Payload = maps:get(<<"payload">>, BatchEntry, #{}),
       InternalParams = maps:with([<<"spaceId">>, <<"fileName">>], BatchEntry),
       InternalParams1 = case maps:find(<<"xattrs">>, Payload) of
  -        {ok, Xattrs} -> InternalParams#{<<"xattrs">> => Xattrs};
  +        {ok, Xattrs} -> InternalParams#{<<"xattrs">> => convert_xattrs(Xattrs)};
           _ -> InternalParams
       end,
       EncodedJson = maps:get(<<"json">>, Payload, <<"{}">>),
  
positive.code: -spec allowed_paths(http_client:method()) -> [binary()].
  allowed_paths(post) -> [<<"^_search.*$">>];
  allowed_paths(get) -> [<<"^_mapping$">>, <<"^_search.*$">>].
  
negative.code:     query_index/3,
      query_validator/0
  ]).
  
  -export([convert_xattrs/1]).
  
  -behaviour(onezone_plugin_behaviour).
  -behaviour(harvester_plugin_behaviour).
  