    ;; Do not index the field, otherwise strings are limited to 32KB. The theoretical max size for
    ;; a field that is not indexed is 2GB.
    :index "no"})
+
+(def indexed-string-type
+  "A string that is indexed but not analyzed."
+  {:type "string"
+   ;; Stored so we can retrieve the value
+   :store "yes"
+   :index "not_analyzed"})
 
 (def type-name
   "The name of the mapping type within the cubby elasticsearch index."

(comment

  (def db (get-in user/system [:apps :cubby :db]))

  (d/reset db)


    :_source {:enabled true},
    :_all {:enabled false},
    :_id   {:path "key-name"},
    :properties {:key-name indexed-string-type

                 ;; Deprecated, remove in future sprint. We changed the value to support values
                 ;; larger than 32KB.
                 :value indexed-string-type

                 :value2 not-indexed-string-type}}})

(def index-settings
  "Defines the cubby elasticsearch index settings."
