Skip to content

Commit

Permalink
Fix native :fields behavior mismatch with rest
Browse files Browse the repository at this point in the history
When processing results from a search query 'convert-fields-result' called getValue instead of getValues. This caused the first of the values to be returned. This behavior is inconsistent with the behavior of the rest api which always returns a vector.
  • Loading branch information
dspiteself authored and michaelklishin committed Jan 11, 2016
1 parent caec8aa commit 114b033
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/clojurewerkz/elastisch/native/conversion.clj
Expand Up @@ -327,7 +327,7 @@
(cond
(instance? java.util.Map fields) (into {} (map (fn [^java.util.Map$Entry e]
[(keyword (.getKey e))
(.. e getValue getValue)]) fields))
(.. e getValue getValues)]) fields))
:else fields))

(defn ^IPersistentMap get-response->map
Expand Down

0 comments on commit 114b033

Please sign in to comment.