i am trying to update elastic data based on ID, but the error is failing with bad request/data missing error.
Code:
Dim testIndex1 = New testIndex With {
.id = txtId.Text.Trim,
.User = txtUserid.Text.Trim,
.DateNdTime = Now,
.Message = Now & ":- " & txtNewMsg.Text.Trim
}
Dim client = connect()
Dim response = client.UpdateAsync(Of testIndex, testIndex)(document:=testIndex1, index:=txtIndex3.Text.Trim)
If response.Result.IsValidResponse Then
lblUpdResponse.Text = "Update succeeded."
End If
Error:
{Unsuccessful (400) low level call on POST: /index01/_update/I0NQACKBE7
Exception: The remote server returned an error: (400) Bad Request. Call: Status code 400 from: POST /index01/_update/I0NQACKBE7. ServerError: Type: action_request_validation_exception Reason: "Validation Failed: 1: script or doc is missing;"
}