Any help to solve these C# NEST (ElasticSearch) errors?


Recently, I have started to work on C# NEST (ElasticSearch), and having some problems:

  1. Error Message: No route taking 1 parameters {index}/_doc/{id}
    when using
    await ESClient.GetAsync(DocumentPath<TModel>.Id(new Id(model.Id)), x => x.Index(indexName));
    await ESClient.DocumentExistsAsync(DocumentPath<TModel>.Id(new Id(model.Id)), x => x.Index(indexName))

  2. Error Message: Invalid NEST response built from a successful (200) low level call on POST: /{index}/_bulk
    when using
    await ESClient.IndexManyAsync(list, indexName)
    await ESClient.BulkAsync(x => x.Index(indexName).IndexMany(list))
    whereas this works fine
    await ESClient.IndexDocumentAsync(model)

With my respect.

Thanks @StephenCleary , (2) solved: I am using ElasticSearch 8.3.2 and NEST 7.17.4. The workaround solution is enabling the compatibility mode: var connectionSettings = new ConnectionSettings(new Uri(str)).EnableApiVersioningHeader();


This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.