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
I would like to upsert documents that have a parent. Right now
the upsert fn does not have any options to pass the parent. If
there's a interest I could send a PR for the upsert fn that
adds optional arguments in a similar way as the create fn. I
thought about something like this:
(defn upsert
"Updates or creates a document using provided data"
([^Client conn index mapping-type ^String id ^Map doc & args]
(let [{:keys [parent]} (ar/->opts args)
req (cnv/->upsert-request index mapping-type id doc)
req (if parent (.parent req parent) req)
res (es/update conn req)]
(cnv/update-response->map (.actionGet res)))))
Roman
The text was updated successfully, but these errors were encountered:
When you create a document with Elastisch you can specify
the :parent of a document. This option is not available in the
upsert fn, which can also create a document. We used to do this
with HTTP PUT requests, but switching over to Elastisch now.
Hello,
I would like to upsert documents that have a parent. Right now
the
upsert
fn does not have any options to pass the parent. Ifthere's a interest I could send a PR for the
upsert
fn thatadds optional arguments in a similar way as the
create
fn. Ithought about something like this:
Roman
The text was updated successfully, but these errors were encountered: