anchor.diff:  -module(dk_in).
   
   %% API
  --export([add_doc/4]).
  +-export([create_index/3, add_doc/4]).
   
   %% For internal use only
   -export(['_add_doc'/4]).
  
positive.code: %%----------------------------------------------------------------------------
  %% API
  %%----------------------------------------------------------------------------
  
  %% @doc Adds a document.
  add_doc(DomId, CatId, DocId, Doc) ->
  
negative.code: %%----------------------------------------------------------------------------
  %% Internal functions
  %%----------------------------------------------------------------------------
  
  posts_list(Binary) ->
      posts_list(Binary, []).
  
  posts_list(<<>>, Acc) ->
      Acc;
  posts_list(Binary, Acc) ->
      [Line, Rest] = binary:split(Binary, <<"\n">>), %% does this work correctly with UTF-8?
      [Id, Text] = binary:split(Line, <<" ">>),
      _Terms = dk_pp:terms(Text, "en"),
      posts_list(Rest, [Id | Acc]).
  
  %% @private
  '_add_doc'(DomId, CatId, DocId, Doc) ->
  