Skip to content

Unify ExplainGet<T> and GetFromUpdate #1490

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

Closed
Mpdreamz opened this issue Jul 17, 2015 · 5 comments
Closed

Unify ExplainGet<T> and GetFromUpdate #1490

Mpdreamz opened this issue Jul 17, 2015 · 5 comments
Assignees

Comments

@Mpdreamz
Copy link
Member

Should be generic, and in order to do that in 2.0 UpdateResponse has to be generic as well.

relates to: #1489

@robertlyson
Copy link
Contributor

I really would love to help with this one, but one question pop up. Is it still to be done?

Looks like IUpdateResponse changed a bit between 1.x and 2.0

2.0

public interface IUpdateResponse : IResponse
{
    ShardsMetaData ShardsHit { get; }
    string Index { get; }
    string Type { get; }
    string Id { get; }
    long Version { get; }
}

1.x

public interface IUpdateResponse : IResponse
{
    ShardsMetaData ShardsHit { get; }
    string Index { get; }
    string Type { get; }
    string Id { get; }
    string Version { get; }
    GetFromUpdate Get { get;  }

    T Source<T>() where T : class;
    FieldSelection<T> Fields<T>() where T : class;
}

@Mpdreamz
Copy link
Member Author

Yeah the added properties and methods were introduced in the linked issue:

https://github.com/elastic/elasticsearch-net/pull/1489/files

They were introduced as methods because making the response object generic would be a breaking change :(

@robertlyson
Copy link
Contributor

Thank you @Mpdreamz, now I understand :)
I'll do my best to handle this.

Also I'll try to write tests #1481 way :)

@Mpdreamz
Copy link
Member Author

Mpdreamz commented Jan 6, 2016

@gmarz @russcam would love to see this in alpha1

See: #1296

@Mpdreamz Mpdreamz added the Vote label Jan 6, 2016
@gmarz gmarz added this to the 2.0.0 RC milestone Jan 14, 2016
@gmarz gmarz removed this from the 2.0.0 milestone Jan 25, 2016
@Mpdreamz Mpdreamz self-assigned this Jan 26, 2016
@robertlyson
Copy link
Contributor

@Mpdreamz thanks for handling 👍. 👎 for @me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants