anchor.diff:  
   %%
   %%
  -elastic_filter(DatalogKey, ElasticKey, Pattern) ->
  +elastic_filter(Type, DatalogKey, ElasticKey, Pattern) ->
      case Pattern of
         %% range filter is encoded as list at datalog: [{'>', ...}, ...]
         #{DatalogKey := [H | _] = Value} when is_tuple(H) ->
            #{range => 
  -            #{ElasticKey => maps:from_list([{elastic_compare(Op), X} || {Op, X} <- Value])}
  +            #{ElasticKey => maps:from_list([{elastic_compare(Op), elasticlog_codec:encode(Type, X)} || {Op, X} <- Value])}
            };
         _ ->
            []
  
positive.code: %%
  %%
  %debug(Json) ->
  %   io:format("~s~n", [jsx:encode(Json)]),
  %   Json.
  
  %%
  %%
  match(#{'@' := 'xsd:string', '_' := [_, P, O | _]} = Pattern) ->
     elastic_query_string(O, P, Pattern);
  
  match(#{'@' := _, '_' := [_, P, O | _]} = Pattern) ->
     elastic_match(O, P, Pattern);
  
  match(_) ->
     [].
  
negative.code: filter(#{'@' := 'georss:hash', '_' := [_, P, O | _]} = Pattern) ->
     elastic_geo_distance(O, P, Pattern);
  
  filter(#{'@' := Type, '_' := [_, P, O | _]} = Pattern) ->
     elastic_filter(semantic:compact(Type), O, P, Pattern);
  
  filter(_) ->
     [].
  