anchor.diff:      {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};
   
  
positive.code: %%                     {stop, Reason}
  %% @doc Initiates the server.
  init(Args) ->
      process_flag(trap_exit, true),
  
      {context, Context} = proplists:lookup(context, Args),
  
      case m_config:get_value(?MODULE, solr, false, Context) of
          false ->
              z_session_manager:broadcast(#broadcast{type="error", message="Not configured yet, not starting.", title="Solr Index", stay=true}, z_acl:sudo(Context)),
              ignore;
  
          SolrUrl ->
              SearchUrl = z_convert:to_list(SolrUrl) ++ "select",
              UpdateUrl = z_convert:to_list(SolrUrl) ++ "update",
              {ok, Solr} = esolr:start_link([{select_url, SearchUrl}, {update_url, UpdateUrl}]),
  
              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.
  
  
  %% @doc A generic Solr query
  
negative.code: 
  %% A "match" query (for sidebars and such)
  handle_call({{search_query, {match, [{id,Id}]}, Limit}, Context}, _From, State=#state{solr=Solr}) ->
      Reply = solr_search:search(Id, Limit, Solr, Context),
      {reply, Reply, State};
  
  %% @doc Trap unknown calls
  