 (defn- build-highlight-query
   "Creates the highlight query that will be passed into elastic"
   [query]
-  (cmr.common.dev.capture-reveal/capture query)
   (when-let [keyword-conditions (get-keyword-conditions (:condition query))]
     (let [conditions-as-string (str/join " " (map #(:query-str %) keyword-conditions))]
        {:fields {:summary {:highlight_query {:query_string {:query conditions-as-string}}}}})))

  (assoc query :highlights (build-highlight-query query)))

(defn- replace-fields-with-highlighted-fields
  "Replaces the appropriate fields with the highlighted snippets for each field."
  [query-results elastic-results]
  query-results)

(defmethod query-execution/post-process-query-result-feature :highlights
  [context query elastic-results query-results feature]
  (cmr.common.dev.capture-reveal/capture-all)
  (replace-fields-with-highlighted-fields query-results elastic-results))

            [cmr.search.models.results :as r]
            [clojure.string :as str]))

(defn- get-keyword-conditions
  "Returns a list of the keyword text conditions from a condition"
  [condition]
  (let [sub-condition (:condition condition)
        sub-conditions (:conditions condition)
        keyword-sub-conditions (for [a-condition (if sub-condition
                                                   (conj sub-conditions sub-condition)
                                                   sub-conditions)
                                 :let [keyword-condition (get-keyword-conditions a-condition)]
                                 :when keyword-condition]
                                 keyword-condition)
