    # File lib/chef/solr_query.rb, line 151
        def rebuild_index(db=Chef::Config[:couchdb_database])
          delete_database(db)

          results = {}
          [Chef::ApiClient, Chef::Node, Chef::Role, Chef::Environment].each do |klass|
            results[klass.name] = reindex_all(klass) ? "success" : "failed"
          end
          databags = Chef::DataBag.cdb_list(true)
          Chef::Log.info("Reloading #{databags.size.to_s} #{Chef::DataBag} objects into the indexer")
          databags.each { |i| i.add_to_index; i.list(true).each { |x| x.add_to_index } }
          results[Chef::DataBag.name] = "success"
          results
        end