Skip to content

_version_type ignored in native bulk #229

Open
@royaldark

Description

@royaldark

#227 added support for _version and _version_type in bulk requests. This works great over REST, but the version type is ignored in native.

This happens because common.bulk/index-operation uses keys of the form _version_type, but native.conversion/->action-requests wants the key version-type (which, if passed in, would be stripped by common.bulk).

(.versionType
  (first
    (clojurewerkz.elastisch.native.conversion/->action-requests
      [(clojurewerkz.elastisch.native.bulk/index-operation
         {:_index "an_index", :_type "a_type", :_id "123456", :_version 5, :_version_type "external"})])))
=> #<INTERNAL>

Not sure the best solution - maybe ->action-requests needs to be more permissive and allow the key version_type as well as version-type?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions