Skip to content

BulkParameters<T> cannot set _id explicitly #388

@maximpashuk

Description

@maximpashuk

https://github.com/Mpdreamz/NEST/blob/master/src/Nest/DSL/BulkIndexDescriptor.cs

Then I use BulkIndexDescriptor, I can provide Id value explicitly, so I don't need to have Id field in my document of type T.
In querying I can refer to builtin elasticsearch property _id.
Thats work fine.

https://github.com/Mpdreamz/NEST/blob/master/src/Nest/Domain/Parameters/BulkParameters.cs
Then I use BulkParameters I have no ability to set Id value explicitly.
I must have Id field declared in my document.
But will have some overhead: builtin elasticsearch _id property and explicit Id field with the same value.
Can query by any of them.

I don't want to have overhead by Id field.
As a workaround I can add JsonIgnore attribute to Id field, but I think this is more hack than workaround.

Since _id field in builtin in elasticsearch, I should have ability to set id in BulkParameters and do not have Id field in my index document.
Please add this ability.

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