meilisearch-dotnet icon indicating copy to clipboard operation
meilisearch-dotnet copied to clipboard

Index.UpdateSettingsAsync uses incorrect method (POST instead of PATCH)

Open MegaThorx opened this issue 2 years ago • 2 comments

Description Index.UpdateSettingsAsync uses incorrect method (POST instead of PATCH).

https://docs.meilisearch.com/reference/api/settings.html#update-settings

Expected behavior Due the incorrect method the meilisearch server responds with status 405

Current behavior Settings should be saved

Screenshots or Logs

Code:

var index = await client.GetIndexAsync(IndexName);

await index.UpdateSettingsAsync(new Settings()
{
    FilterableAttributes = new [] { "Type" },
    SearchableAttributes = new [] { "Title", "Description" }
});

Meilisearch log:

[2022-07-11T18:47:48Z INFO  actix_web::middleware::logger] 127.0.0.1 "GET /indexes/resources HTTP/1.1" 200 123 "-" "Meilisearch .NET (v0.10.2)" 0.000369
[2022-07-11T18:47:48Z INFO  actix_web::middleware::logger] 127.0.0.1 "POST /indexes/resources/settings HTTP/1.1" 405 0 "-" "Meilisearch .NET (v0.10.2)" 0.000043

Environment (please complete the following information):

  • OS: Windows 11
  • Meilisearch version: 0.28.0
  • meilisearch-dotnet version: 0.10.2

MegaThorx avatar Jul 11 '22 18:07 MegaThorx

Hi @MegaThorx, Indeed the v0.28.0 of Meilisearch is released yesterday but the SDK is not yet updated with this. The v0.10.2 of this SDK is only compatible with the v0.27, I let you check the changelog about it. I will try to update it as soon as possible. Sorry for the inconvenience.

alallema avatar Jul 12 '22 07:07 alallema

Yeah I realized it shortly after opening the issue. I downloaded the older version of Meilisearch and it works fine ;)

MegaThorx avatar Jul 12 '22 13:07 MegaThorx

This issue was fixed in the v0.11.0

alallema avatar Sep 19 '22 15:09 alallema