anchor.diff:                  State#base_state{log_msg=Why}}
       end.
   
  +solr_ids_length({Solr1Ids, _}) ->
  +    length(Solr1Ids);
  +solr_ids_length(Solr1Ids) ->
  +    length(Solr1Ids).
  +
   %% Return current app config value for batch size, defaulting if absent.
   batch_size() ->
       envy:get(chef_wm, bulk_fetch_batch_size, ?DEFAULT_BATCH_SIZE, positive_integer).
  
positive.code: extract_path(Item, Path) ->
      ej:get(list_to_tuple(Path), Item, null).
  
  make_search_results(BulkGetFun, Ids, BatchSize, Start, NumFound) ->
      Ans0 = search_result_start(Start, NumFound),
      {N, Ans1} = fetch_result_rows(Ids, BatchSize, BulkGetFun, {0, Ans0}),
  
negative.code:                              end
                       end).
  
  -spec gather_solr_queries([pid()], #chef_solr_query{}, binary()) ->
                                   {ok, non_neg_integer(), non_neg_integer(), {[binary()], {[binary()], #chef_solr_query{}, binary()}}}.
  gather_solr_queries(Pids, Query, OrgName) ->
      [Solr1,Solr4] = [ receive
                            {Pid, Result} ->
                                Result
                        after envy:get(chef_wm, solr_timeout, 30000, pos_integer) ->
                                erlang:error({solr_query_timeout, Pid})
                        end
                        || Pid <- Pids ],
      log_error_differences(Solr1, Solr4, Query, OrgName),
      combine_results(Solr1, Solr4, Query, OrgName).
  
  combine_results({error, _} = Solr1, _, _, _) ->
      Solr1;
  combine_results(Solr1, {error, _}, _, _) ->
      Solr1;
  combine_results({Resp,Start,Count,Solr1Results}, {_,_,_,Solr4Results}, Query, OrgName) ->
      {Resp, Start, Count, {Solr1Results, {Solr4Results, Query, OrgName}}}.
  
  log_error_differences({error, _} = Solr1, {_,_,_,Solr4}, Query, OrgName) ->
      lager:log(debug, [{solr_diff, ?MODULE}], "~p",
                [?LOG_DIFF_TUPLE(Solr1, Solr4, Query, OrgName)]);
  log_error_differences({_,_,_,Solr1}, {error, _} = Solr4, Query, OrgName) ->
      lager:log(debug, [{solr_diff, ?MODULE}], "~p",
                [?LOG_DIFF_TUPLE(Solr1, Solr4, Query, OrgName)]);
  log_error_differences(_NotAnErrorCondition, _Solr4, _Query, _OrgName) ->
      ok.
  
  log_differences(DbHitCount, OldSolrResults,{NewSolrResults, Query, OrgName}) ->
      case DbHitCount =:= length(NewSolrResults) of
          true ->
              ok;
          false ->
              case chef_wm_util:lists_diff(OldSolrResults, NewSolrResults) of
                  {[], []} ->
                      ok;
                  {Solr1, Solr4} ->
                      lager:log(debug, [{solr_diff, ?MODULE}], "~p",
                                [?LOG_DIFF_TUPLE(Solr1, Solr4, Query, OrgName)])
              end
      end.
  
  spawn_solr_query(Label, Url, Query, ReqId) ->
      Parent = self(),
  