Skip to content

7.5.0 fails to index documents using low level client. #4289

@niemyjski

Description

@niemyjski

NEST/Elasticsearch.Net version: 7.5.0

Elasticsearch version: 7.4.2 & 7.5.0

Description of the problem including expected versus actual behavior:
We upgraded our clients this morning from 7.4.2 to 7.5.0 and we had two tests failing. This one occurs after we try to create an error index for documents that failed to index.

Please note this index is created in a previous call:

 var createResponse = await _client.Indices.CreateAsync(workItem.NewIndex + "-error", d => d.Map(md => md.Dynamic(false))).AnyContext();
            
string document = JsonConvert.SerializeObject(new {
                failure.Index,
                failure.Id,
                gr.Version,
                gr.Routing,
                gr.Source,
                failure.Cause,
                failure.Status,
                gr.Found,
            });
            var indexResponse = await _client.LowLevel.IndexAsync<VoidResponse>(workItem.NewIndex + "-error", PostData.String(document));
[405] PUT /employees-v2-error/_doc?pretty=true
 {
   "Cause": {
     "headers": {},
     "root_cause": null
   },
   "Found": true,
   "Id": "5dfa29b22da6ff00851bc366",
   "Index": "employees-v2",
   "Routing": null,
   "Source": {
     "age": 99,
     "companyId": "5dfa29b22da6ff00851bc365",
     "createdUtc": "2019-12-18T13:29:22.4686Z",
     "id": "5dfa29b22da6ff00851bc366",
     "isDeleted": false,
     "lastReview": "0001-01-01T00:00:00",
     "location": "37.0365416105075,-57.4688381317392",
     "nextReview": "0001-01-01T00:00:00+00:00",
     "phoneNumbers": [],
     "updatedUtc": "2019-12-18T13:29:22.4686Z",
     "yearsEmployed": 0
  },  
 "Status": 400,
  "Version": 1
 }
 {
   "error" : "Incorrect HTTP method for uri [/employees-v2-error/_doc?pretty=true] and method [PUT], allowed: [POST]",
   "status" : 405
 }

I tried going through the diff between the two versions but it was massive. I didn't see anything that really stood out of what would have changed in the low level client.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions