使用默认值在Solr中添加新字段时出错

时间:2015-12-01 15:09:05

标签: solr

我正在尝试使用默认值在Solr中添加新字段但是低于错误。我确信我使用了错误的密钥作为默认密钥但无法在Google中获得正确的密钥。

命令

curl -H 'Content-type: application/json' -d '{"name": "ALL_MODE_INDC","stored": true,"indexed": true,"field_type": "string" ,"default":"N"}' http://<solrServer>:<solrIP>/api/collections/ALGORITHM_AU_TEST/fields

错误消息

{"errors":[{"message":"Unknown or dissallowed key found:default","code":"error.forbidden.key","key":"default"}],"http_status_name":"Unprocessable Entity","http_status_code":422}

1 个答案:

答案 0 :(得分:0)

刚拿到解决方案(将密钥名称更改为“default_value”) -

var gastLibUrl = 'https://raw.githubusercontent.com/zixia/gast/master/src/gas-tap-lib.js'
eval(UrlFetchApp.fetch(gastLibUrl).getContentText())

var test = GasTap.setPrintDriver('Logger') 

function gast() {

  test('do calculation right', function (t) {    
    var i = 3 + 4
    t.equal(i, 7, 'I can calc 3 + 4 = 7')
  })

  test('Spreadsheet exist', function (t) {
    var ss = SpreadsheetApp.openById('1TBJpvlW3WWney4rk1yW5N9bAP8dOMkWxI97dOtco-fc')
    t.ok(ss, 'I can open spreadsheet')
  })

  test.finish()
}