Schema修正
    • PDF

    Schema修正

    • PDF

    記事の要約

    Schema変更時、インデックスは追加のみ可能です。

    PUT https://cloudsearch.apigw.ntruss.com/CloudSearch/real/v1/domain/{name}/schema
    

    リクエスト

    リクエストパラメータ

    パラメータ名必須タイプ制約事項説明
    nameYesstring作成されているDomain名

    リクエストボディ

    フィールド名必須タイプ制約事項説明
    schema.documentYesSchema有効なSchema(Schema検証を通じて確認可能)検索設定

    レスポンス

    レスポンスStatus

    HTTP StatusDesc
    200OK(修正完了)
    400Bad Request
    401Unauthorized
    403Forbidden
    404Not Found
    500Internal Server Error

    例示

    リクエスト例示 - 既存作成したschemaにnameとphone_numberセクションをすべて検索するstudentインデックスを追加

    PUT https://cloudsearch.apigw.ntruss.com/CloudSearch/real/v1/domain/student/schema
    
    PUT /CloudSearch/real/v1/domain/student/schema HTTP/1.1
    Host:cloudsearch.apigw.ntruss.com
    accept:application/json
    
    x-ncp-apigw-signature-v2: NR8ES668xeqaO4M6gvDfmHmJZB9lVHs7p/qbytdW1BI=
    x-ncp-apigw-timestamp: 1545973892478
    x-ncp-iam-access-key: teGTwtcSEGA7fu28BGGi
    
    {
      "document": {
        "primarySectionName": "name",
        "sections": [
          {
            "docProperties": [
              {
                "type": "string",
                "name": "dp_name"
              }
            ],
            "name": "name"
          },
          {
            "docProperties": [
              {
                "type": "string",
                "name": "dp_phone_number"
              }
            ],
            "name": "phone_number"
          }
        ],
        "indexes": [
          {
            "documentTermWeight": "sum_wgt",
            "buildInfos": [
              {
                "sections": [
                  "name"
                ],
                "sectionTermWeight": "1.0 * stw_2p(tf, 0.5, 0.25, 0., length / 128.0)",
                "indexProcessors": [
                  {
                    "type": "hanaterm",
                    "method": "sgmt",
                    "option": "+korea +josacat +eomicat"
                  }
                ],
                "name": "index_build_0"
              }
            ],
            "name": "name"
          },
     {
            "documentTermWeight": "sum_wgt",
            "buildInfos": [
              {
                "sections": [
                  "name",
                  "phone_number"
                ],
                "sectionTermWeight": "1.0 * stw_2p(tf, 0.5, 0.25, 0., length / 128.0)",
                "indexProcessors": [
                  {
                    "type": "hanaterm",
                    "method": "sgmt",
                    "option": "+korea +josacat +eomicat"
                  }
                ],
                "name": "index_build_0"
              }
            ],
            "name": "student"
          }
        ]
      }
    }
    

    レスポンス例示 (共通)

    {
      "result": "OK"
    }
    

    この記事は役に立ちましたか?

    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.