Skip to content
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

IDeleteResponse.OK is false #576

Closed
nariman-haghighi opened this issue Apr 10, 2014 · 3 comments
Closed

IDeleteResponse.OK is false #576

nariman-haghighi opened this issue Apr 10, 2014 · 3 comments

Comments

@nariman-haghighi
Copy link

Using the latest on master, noticing that delete response OK isn't correctly populating despite the underlying operation against ES succeeding without errors - here's the output from the immediate window:

?r.OK
false
?r.ConnectionStatus.Success
true
?r.ConnectionStatus
{StatusCode: 200,
Method: DELETE,
HttpStatusCode: 200
NumberOfRetries: 0
OriginalException: null
RequestMethod: "DELETE"
ResponseRaw: null
Success: true
SuccessOrKnownError: true

And the original call:

public bool Delele(Guid streamId)
        {
            IDeleteResponse r = new ElasticClient(SearchSettings).Delete<MediaStream>(streamId.ToString(), i => i.Index("Stream"));
            return r.OK;
        }
@Mpdreamz
Copy link
Member

Hey Nariman,

Elasticsearch 1.0 removed the OK properties, you should check for ".Found" instead now.

@Mpdreamz Mpdreamz reopened this Apr 11, 2014
@nariman-haghighi
Copy link
Author

Thank you, updated... just a note: it seems deleting by Query doesn't return true for .Found, but does return true for .IsValid and .ConnectionStatus.

@nariman-haghighi
Copy link
Author

Also, for IIndexResponse, .OK returned true for both inserts and updates versus the new .Created only returns true for inserts.

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

2 participants