-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Add SequenceNumber and PrimaryTerm to Hits, Get and MulitGetHit #3714
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This commit adds the SequenceNumber and PrimaryTerm properties to the Hit<T>, MultiGetHit<T> and GetResponse. Closes #3708
|
We should consider standardising on the naming for Sequence Number, Primary Term. I've added as |
codebrain
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM , naming of SequenceNumber and PrimaryTerm looks good, only a minor TODO left over, but I believe it can be safely ignored.
|
|
||
| namespace Nest | ||
| { | ||
| // TODO: Looks like this can be removed? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TODO?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Related to the removal of response interfaces that @Mpdreamz was working on.
Added to discuss before GA, but not needed to address to merge this PR.
|
These need to be added to Also, it seems a bit bad that there isn't any shared interface that contains |
|
@ejsmith Are there scenarios where you think having an interface for the two properties would help? I'm struggling to think of them, because aren't you always dealing with a known response or type? Do you have an example of how an interface would help, to help me see? |
|
@russcam I have scenarios where I am doing versioning on documents for all sorts of use cases and that requires me to map those properties to and from my own models. So currently, I need to have extension methods for all of the different response and request models that have the properties instead of just a single extension method if there was a shared contract for these properties. Also, just want to confirm that you saw that these properties are missing on |
|
@ejsmith Ok, we can introduce an interface for both properties. Suggestions for a name,
They're on bulk index and delete operations per the docs, are we missing a place? |
This commit updates - SeqNo - SeqNoPrimaryTerm - IfSeqNo to expand SeqNo out to SequenceNumber, in generated types and methods, ofr consistency
|
Looking into an interface for SequenceNumber and PrimaryTerm, I don't think it'd be possible to unify types that have these properties to one interface because they may not have values on some types, depending on whether In order to get an alpha2 out, I'm going to merge this PR in, and we can open another issue to discuss an interface. |
This commit adds the SequenceNumber and PrimaryTerm properties to the Hit, MultiGetHit and GetResponse.
Closes #3708