curl:(3)第3列中的[globbing]坏范围规范

时间:2017-03-21 12:13:24

标签: json curl post solr

我试图使用curl索引solr中的简单json数据。当我使用命令时,它说

"curl -X POST -H 'Content-Type:application/json'-d http://localhost:8983/solr/informationretrieval/update/json/docs '[{"id":"1","title":"Doc 1"},{"id":"2","title":"Doc 2"}]'
{"responseHeader":{"status":0,"QTime":1}}
curl: (3) [globbing] bad range specification in column 3"

我试过删除引号,试过-g和--globoff等但每次都有非法端口号这样的错误。有人可以帮忙吗?

1 个答案:

答案 0 :(得分:0)

添加多个JSON文档

curl -X POST -H 'Content-Type: application/json' 'http://localhost:8983/solr/informationretrieval/update' --data-binary '
    [
      {
        "id": "1",
        "title": "Doc 1"
      },
      {
        "id": "2",
        "title": "Doc 2"
      }
    ]'