                                    (set visible-concept-ids)))
         results (get-highest-visible-revisions context deleted-concept-ids result-format)
         ;; when results is nil, hits is 0
-        hits (get-in results [:hits :value] 0)
+        hits (get results :hits 0)
         results (or results {:hits hits :items []})
         total-took (- (System/currentTimeMillis) start-time)
         ;; construct the response results string

                                                                    query))
        total-took (+ query-creation-time find-concepts-time)]
    (info (format "Found %d %ss in %d ms from client %s in format %s with aql: %s."
                  (get-in results [:hits :value]) (name concept-type) total-took (:client-id context)
                  (rfh/printable-result-format (:result-format query)) aql))
    (assoc results :took total-took)))


                                         context concept-type query))
        total-took (+ query-creation-time find-concepts-time)]
    (info (format "Found %d %ss in %d ms from client %s in format %s with params %s."
                  (:hits results) (name concept-type) total-took (:client-id context)
                  (rfh/printable-result-format (:result-format query)) (pr-str params)))
    (assoc results :took total-took)))

