anchor.diff:                                       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'.
   %%
  
positive.code:          ez_name_id_dict/2,
           ez_reindex_by_id/3,
           ez_reindex_by_name/3,
           ez_reindex_from_file/1,
           make_context/0,
           reindex/2,
  
negative.code:     %% returned as EJson directly, because none of their
      %% information is actually stored as a JSON "blob" in the
      %% database.
      PreliminaryEJson = decompress_and_decode(SO),
      NameKey = name_key(chef_object_type(Index)),
      ItemName = ej:get({NameKey}, PreliminaryEJson),
      {ok, ObjectId} = dict:find(ItemName, NameIdDict),
  