anchor.diff:      ok = solr_commit(),
       ok.
   
  -%% TODO: Deal properly with errors
  -%% @doc Delete all search index entries for a given organization and type.
  --spec delete_search_db_by_type(OrgId :: binary(), Type :: binary()) -> ok.
  -delete_search_db_by_type(OrgId, Type) ->
  +%% @doc Delete all search index entries for a given
  +%% organization and type.  Types are generally binaries or strings elsewhere in this
  +%% module. We should think about converting the other APIs in this file to use atoms
  +%% instead.
  +%% Note: This omits solr_commit because of the high cost of that call in production.
  +%% Some users will want to call the commit directly.
  +%% @end
  +-spec delete_search_db_by_type(OrgId :: binary(), Type :: atom()) -> ok.
  +delete_search_db_by_type(OrgId, Type)
  +  when Type == client orelse Type == data_bag_item orelse
  +       Type == environment orelse Type == node orelse
  +       Type == role ->
       DeleteQuery = "<?xml version='1.0' encoding='UTF-8'?><delete><query>" ++
           search_db_from_orgid(OrgId) ++ " AND " ++
           search_type_constraint(Type) ++
           "</query></delete>",
  -    ok = solr_update(DeleteQuery),
  -    ok = solr_commit(),
  -    ok.
  +    solr_update(DeleteQuery).
  +
   
   %% Internal functions
   
  
positive.code:     end.
  
  %% @doc Sends a "commit" message directly to Solr
  -spec solr_commit() -> ok | {error, term()}.
  solr_commit() ->
      solr_update("<?xml version='1.0' encoding='UTF-8'?><commit/>").
  
negative.code: 
  %% @doc Generates a constraint for chef_type
  %% @end
  -spec search_type_constraint(Type :: atom()) -> TypeConstraint :: [byte(),...].
  search_type_constraint(Type) ->
      "X_CHEF_type_CHEF_X:" ++ atom_to_list(Type).
  
  
  % /solr/select?
  