     [{:keys [field values case-sensitive?]} concept-type]
     (let [field (query-field->elastic-field field concept-type)
           field (if case-sensitive? field (str (name field) ".lowercase"))
-          values (if case-sensitive? values (map s/lower-case values))]
+          values (if case-sensitive? values (map str/lower-case values))]
       {:terms {field values
                :execution "bool"}}))
 

(ns cmr.search.data.query-to-elastic
  "Defines protocols and functions to map from a query model to elastic search query"
  (:require [clojurewerkz.elastisch.query :as q]
            [clojure.string :as s]
            [cmr.search.models.query :as qm]
            [cmr.search.data.datetime-helper :as h]
            [cmr.common.services.errors :as errors]

    [{:keys [field value case-sensitive? pattern?]} concept-type]
    (let [field (query-field->elastic-field field concept-type)
          field (if case-sensitive? field (str (name field) ".lowercase"))
          value (if case-sensitive? value (str/lower-case value))]
      (if pattern?
        {:query {:wildcard {field value}}}
        {:term {field value}})))
