Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Get rid of the field duplication in mapping declaration.

  • Loading branch information...
commit 9e151d0ea63e8c5a207fae899a8e9351f4a7d914 1 parent cc63d03
@drewr drewr authored
View
2  src/esperanto/admin/indices.clj
@@ -16,7 +16,7 @@
(.setSettings (json/encode settings)))]
(when mapping
(doseq [[type obj] mapping]
- (.addMapping req (name type) (json/encode obj))))
+ (.addMapping req (name type) (json/encode {type obj}))))
req)))
(defn make-refresh-request [client & indices]
View
15 test/esperanto/test/search.clj
@@ -13,14 +13,13 @@
(def index "twitter")
(def mapping {:tweet
- {:tweet
- {:_source {:enabled false}
- :properties
- {:text
- {:store "yes"
- :type "string"
- :index "not_analyzed"
- }}}}})
+ {:_source {:enabled false}
+ :properties
+ {:text
+ {:store "yes"
+ :type "string"
+ :index "not_analyzed"
+ }}}})
(def doc {:type "tweet"
:text "The quick brown fox jumps over the lazy dog"})
Please sign in to comment.
Something went wrong with that request. Please try again.