anchor.diff:  %% @doc Starts the server
   start_link(Args) when is_list(Args) ->
       gen_server:start_link(?MODULE, Args, []).
  +
  +
  +pid_observe_search_query(Pid, {search_query, {solr, _Query}, _Limit} = Search, Context) ->
  +    gen_server:call(Pid, {Search, Context});
  +pid_observe_search_query(Pid, {search_query, {match, [{id,_Id}]}, _Limit} = Search, Context) ->
  +    gen_server:call(Pid, {Search, Context});
  +pid_observe_search_query(_Pid, _Query, _Context) ->
  +    undefined.
  +
  +pid_observe_rsc_pivot_done(Pid, Msg, _Context) ->
  +    gen_server:cast(Pid, Msg).
  +
  +pid_observe_rsc_delete(Pid, Msg, _Context) ->
  +    gen_server:cast(Pid, Msg).
  +
   
   %%====================================================================
   %% gen_server callbacks
  
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: 
              AutoCommit = z_convert:to_integer(m_config:get_value(?MODULE, autocommit_time, 3000, Context)),
              esolr:set_auto_commit({time, AutoCommit}, Solr),
              {ok, #state{context=z_context:new(Context),solr=Solr}}
      end.
  
  