You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Related to #54 another issue we're running into is elastisch doesn't seem to support using the optimistic locking built into elasticsearch. Specifically, on the index-request, one should be able to trigger a setVersion call.
;; Put workaround; Acts like native.document.put, but supports :version. Replace calls to this with es-doc/put when; https://github.com/clojurewerkz/elastisch/issues/56 is fixed
(defn-put [index-name type document & { :as options }]
(let [index-request (cnv/->index-request index-name type document options)]
(if-let [version (:version options)]
(.version index-request version))
; Note: this should really be .actionGet not .get (https://github.com/clojurewerkz/elastisch/issues/54)
(cnv/index-response->map (.get (es-native/index index-request)))))
Related to #54 another issue we're running into is elastisch doesn't seem to support using the optimistic locking built into elasticsearch. Specifically, on the index-request, one should be able to trigger a setVersion call.
Docs on setVersion: https://github.com/elasticsearch/elasticsearch/blob/master/src/main/java/org/elasticsearch/action/index/IndexRequestBuilder.java#L281
This should probably just be another when in https://github.com/clojurewerkz/elastisch/blob/master/src/clojurewerkz/elastisch/native/conversion.clj#L148
The text was updated successfully, but these errors were encountered: