Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Try to streamline the update api's #795
Ok huge breaking change post RC1 but I feel its worth swollowing our pride to come up with a better public API
in the update and bulk update api the
Furthermore the generic type names for
For some actual examples.
referenced this pull request
Jul 16, 2014
For consistency and alignment with ES itself, I would prefer to see Just .Doc() and .DocAsUpsert(), with an error thrown if the specified doc didn't provide an ID along with the partial update fields. Without knowing any NEST specifics, that's the usage I would have inferred from glancing at ES docs.
Thats the confusing part. The
Is also valid update statement, we currently already throw if we can not get an id and the object initializer syntax forces you to specify an id on the constructor.
But your point is valid, now we no longer have
@gmarz i'm +1 on
I'm a bit torn here.
While I like the verbosity of PartialDocument and the fact that it's more C#-ish, if you will, I still think it might be confusing to some people because they're going to be looking for the matching Doc property from the Elasticsearch DSL. The majority of the time, NEST maps 1-to-1 with the ES DSL names, so I think we should stay consistent here.
I'm +1 for .