_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달 전346회 조회
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달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠