anchor.diff:  reindex(Ctx, {OrgId, _OrgName}=OrgInfo, Index) ->
       NameIdDict = chef_db:create_name_id_dict(Ctx, Index, OrgId),
       %% Grab all the database IDs to do batch retrieval on
  -    AllIds = dict:fold(fun(_K, V, Acc) -> [V|Acc] end,
  -                       [],
  -                       NameIdDict), %% All dict values will be unique anyway
  +    AllIds = all_ids_from_name_id_dict(NameIdDict),
       BatchSize = envy:get(chef_wm, bulk_fetch_batch_size, pos_integer),
       batch_reindex(Ctx, AllIds, BatchSize, OrgInfo, Index, NameIdDict).
   
  
positive.code:     OrgInfo = {OrgId, OrgName},
      reindex_by_id(Ctx, OrgInfo, Index, Ids).
  
  -spec ez_name_id_dict(binary(), index()) -> dict().
  ez_name_id_dict(OrgName, Index) ->
      Ctx = make_context(),
  
negative.code:                                      Time
                                      ]),
      chef_db:make_context(ReqId).
  
  send_direct_to_solr(_, _, {error, _} = Error, _, _) ->
      %% handle error from chef_db:bulk_get
      erlang:error(Error);
  send_direct_to_solr(OrgId, Index, Objects, NameIdDict, SolrUrl) ->
      %% NOTE: we could handle the mapping of Object to Id in the caller and pass in here a
      %% list of {Id, Object} tuples. This might be better?
      SolrCtx = lists:foldl(
        fun(SO, Ctx) ->
                {Id, IndexEjson} = ejson_for_indexing(Index, OrgId, SO, NameIdDict),
                chef_index_expand:add_item(Ctx, Id, IndexEjson, Index, OrgId)
        end, chef_index_expand:init_items(SolrUrl), Objects),
      chef_index_expand:send_items(SolrCtx).
  
  ejson_for_indexing(Index, OrgId, SO, NameIdDict) ->
      PrelimEJson = decompress_and_decode(SO),
      NameKey = name_key(chef_object_type(Index)),
      ItemName = ej:get({NameKey}, PrelimEJson),
      {ok, ObjectId} = dict:find(ItemName, NameIdDict),
      StubRec = stub_record(Index, OrgId, ObjectId, ItemName, PrelimEJson),
      IndexEjson = chef_object:ejson_for_indexing(StubRec, PrelimEJson),
      {ObjectId, IndexEjson}.
  
  %% All object types are returned from chef_db:bulk_get/4 as
  %% binaries (compressed or not) EXCEPT for clients, which are
  %% returned as EJson directly, because none of their
  %% information is actually stored as a JSON "blob" in the
  %% database.
  decompress_and_decode(Bin) when is_binary(Bin) ->
      chef_db_compression:decompress_and_decode(Bin);
  decompress_and_decode(Object) ->
      Object.
  
  
  %% @doc Reindex objects listed in file `File'.
  %%
  