_cluster/settingでbodyの内容をPUTすることができないのはなぜですか。

0

事前学習済みモデルを利用してsemantic search機能を作成しようとしています。 次のページを参考にしています。https://opensearch.org/docs/latest/ml-commons-plugin/semantic-search/

ページのPrerequisitesの部分で、

PUT _cluster/settings
{
  "persistent": {
    "plugins": {
      "ml_commons": {
        "only_run_on_ml_node": "false",
        "model_access_control_enabled": "true",
        "native_memory_threshold": "99"
      }
    }
  }
}

を実施してみたのですが、 次のようなエラーが返ってきます。

{
    "Message": "Your request: '/_cluster/settings' payload is not allowed."
}

ちなみに、GET _cluster/settings は何の問題もなく返信が来ます。

--------2023/11/29 16:16(進捗)-----------------------------------------------------------------------

https://opensearch.org/docs/latest/api-reference/cluster-api/cluster-settings/ 以上のページで次のような記述を発見。

Request fields
The GET operation has no request body options. All cluster setting field parameters are optional.

Not all cluster settings can be updated using the cluster settings API. You will receive the error message "setting [cluster.some.setting], not dynamically updateable" when trying to configure these settings through the API.

For a listing of all cluster settings, see Configuring OpenSearch.

Configuring Opensearchを調査中...

yuuka_u
質問済み 5ヶ月前325ビュー
1回答
0
承認された回答

答えを見つけることができました。 解決策はこちらのページに従いました。 https://docs.aws.amazon.com/opensearch-service/latest/developerguide/supported-operations.html#version_api_notes

ページには

The high-level Java REST client uses the expanded form, so if you need to send settings requests, use the low-level client.

と記載。

うまくいかない例

PUT _cluster/settings
{
  "persistent": {
    "plugins": {
      "ml_commons": {
        "only_run_on_ml_node": "false",
        "model_access_control_enabled": "true",
        "native_memory_threshold": "99"
      }
    }
  }
}

うまくいった例

PUT _cluster/settings
{
  "persistent": {
      "plugins.ml_commons.only_run_on_ml_node": "false",
      "plugins.ml_commons.model_access_control_enabled": "true",
      "plugins.ml_commons.native_memory_threshold": "99"
    }
  }

うまくいった例で実行したところ、_cluster/settingに追加することができました。

yuuka_u
回答済み 5ヶ月前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ