anchor.diff:  %% Internal functions
   %%----------------------------------------------------------------------------
   
  +%% @doc Converts a UTF-8 string to a query. Returns a query record plus the
  +%% depth of the corresponding tree.
  +-spec from_str(utf8_str()) -> {q(),pos_integer()}.
   from_str(Str) ->
       {ok,ParseTree} = dk_q_parser:parse(scan(Str)),
       tree_to_query(ParseTree).
  
positive.code: tree_to_query({term_q,{string,Keyword,_}}) ->
      {#term_q{keyword = Keyword},0}.
  
  dnf({Q,0}) ->
      Q;
  dnf({Q,D}) ->
  
negative.code: -spec execute(utf8_str()) -> gb_set(). %% TODO: might return an error
  execute(Str) ->
      %% parse and preprocess query
      Clauses = [partition(flatten(X)) || X <- clauses(dnf(from_str(Str)))],
      %% fetch data
      Data = plists:mapreduce(
               fun fetch/1, 
  