anchor.diff:  
               AutoCommit = z_convert:to_integer(m_config:get_value(?MODULE, autocommit_time, 3000, Context)),
               esolr:set_auto_commit({time, AutoCommit}, Solr),
  -
  -            %% Hook into z_search
  -            z_notifier:observe(search_query, self(), Context),
  -
  -            %% Watch for changes to resources
  -            z_notifier:observe(rsc_pivot_done, self(), Context),
  -            z_notifier:observe(rsc_delete, self(), Context),
  -
               {ok, #state{context=z_context:new(Context),solr=Solr}}
       end.
   
  
positive.code: %% terminate. It should be the opposite of Module:init/1 and do any necessary
  %% cleaning up. When it returns, the gen_server terminates with Reason.
  %% The return value is ignored.
  terminate(_Reason, State) ->
      Context = State#state.context,
      z_notifier:detach(search_query, self(), Context),
      z_notifier:detach(rsc_pivot_done, self(), Context),
      z_notifier:detach(rsc_delete, self(), Context),
      ok.
  
  %% @spec code_change(OldVsn, State, Extra) -> {ok, NewState}
  
negative.code:     Reply = solr_search:match(Id, Limit, Solr, Context),
      {reply, Reply, State};
  
  %% @doc Trap unknown calls
  handle_call(Message, _From, State) ->
      {stop, {unknown_call, Message}, State}.
  
  
  %% @doc Pivot-hook for putting document in solr.
  handle_cast({rsc_pivot_done, Id, _IsA}, State=#state{context=Context,solr=Solr}) ->
      ok = solr_store:put(Id, Context, Solr),
      {noreply, State};
  
  handle_cast({rsc_delete, Id}, State=#state{context=Context,solr=Solr}) ->
      ?DEBUG("Deleting!"),?DEBUG(Id),
      ok = solr_store:delete(Id, Context, Solr),
      {noreply, State};
  