      ;; set the default format to xml
      (mt/mime-type->format mime-type default-mime-type))))
 
+(defn- get-search-results-format-by-concept
+  "Establishes valid mime types by concept and delegates requested search results format determination to get-search-results-format fn."
+  [concept-type path-w-extension headers default-mime-type]
+  (let [invalid-gran-mime-types #{"application/dif+xml"}
+        invalid-coll-mime-types #{}
+        gran-mime-types (set/difference search-result-supported-mime-types invalid-gran-mime-types)
+        coll-mime-types (set/difference search-result-supported-mime-types invalid-coll-mime-types)]
+    (cond
+      (= :collection concept-type)
+      (get-search-results-format path-w-extension headers coll-mime-types default-mime-type)
+      (= :granule concept-type)
+      (get-search-results-format path-w-extension headers gran-mime-types default-mime-type)
+      :else (get-search-results-format path-w-extension headers default-mime-type))))
+
 (defn process-params
   "Processes the parameters by removing unecessary keys and adding other keys like result format."
   [params path-w-extension headers default-mime-type]
-   (-> params
-       (dissoc :path-w-extension)
-       (dissoc :token)
-       (assoc :result-format (get-search-results-format path-w-extension headers default-mime-type))))
+  (-> params
+      (dissoc :path-w-extension)
+      (dissoc :token)
+      (assoc :result-format (get-search-results-format path-w-extension headers default-mime-type))))
 
 (defn- search-response
   "Generate the response map for finding concepts by params or AQL."

            [compojure.core :refer :all]
            [clojure.string :as str]
            [clojure.java.io :as io]
            [ring.util.response :as r]
            [ring.util.request :as request]
            [ring.util.codec :as codec]

            context (-> context
                        (acl/add-authentication-to-context params headers)
                        (assoc :query-string query-string))
            params (process-params concept-type params path-w-extension headers "application/xml")
            result-format (:result-format params)
            _ (info (format "Searching for %ss from client %s in format %s with params %s."
                            (name concept-type) (:client-id context) result-format
