使用REST API保存smart-match-options返回REST-REPEATEDPARAM错误

时间:2019-03-19 04:24:46

标签: marklogic

需要有关我实际出问题的地方的帮助。
我正在使用Smart Mastering Rest api保存smart-match-options,但不知何故。我不明白为什么它返回重复的参数错误。

尝试使用REST api保存smart-match-options时会返回以下错误:

  

{“ errorResponse”:{“ statusCode”:400,“ status”:“ Bad Request”,“ messageCode”:“ REST-REPEATEDPARAM”,“ message”:“ REST-REPEATEDPARAM:(err:FOER0000)端点不支持重复的参数:名称只能出现一次”}}

发布到以下URI:-http://localhost:8800/v1/resources/sm-match-options?name=test12

请求正文:

{
"options": {
    "propertyDefs": {
        "property": [
            {
                "namespace": "",
                "localname": "EmployeeID",
                "name": "empID"
            },
            {
                "namespace": "",
                "localname": "EmployeeFirstName",
                "name": "employee-first-name"
            },
            {
                "namespace": "",
                "localname": "EmployeeLastName",
                "name": "employee-last-name"
            },
            {
                "namespace": "",
                "localname": "Address",
                "name": "addr"
            },
            {
                "namespace": "",
                "localname": "LocationCity",
                "name": "city"
            },
            {
                "namespace": "",
                "localname": "LocationState",
                "name": "state"
            },
            {
                "namespace": "",
                "localname": "LocationPostalCode",
                "name": "zip"
            }
        ]
    },
     "algorithms": {
  "algorithm": [

    { "name": "dbl-metaphone", "function": "double-metaphone" }

  ]
},

    "scoring": {
        "add": [
            {
                "propertyName": "employee-last-name",
                "weight": "10"
            },
            {
                "propertyName": "employee-first-name",
                "weight": "10"
            },
            {
                "propertyName": "addr",
                "weight": "10"
            },
            {
                "propertyName": "city",
                "weight": "10"
            },
            {
                "propertyName": "state",
                "weight": "10"
            },
            {
                "propertyName": "zip",
                "weight": "10"
            },
            {
                "propertyName": "empID",
                "weight": "6"
            }
        ]
    },
    "thresholds": {
        "threshold": [
            {
                "above": "35",
                "label": "Definitive Match",
                "action": "merge"
                }
            ]
        }
    }
}

0 个答案:

没有答案