curl:(3)第3列中的[globbing]不良范围规范 [英] curl: (3) [globbing] bad range specification in column 3

查看:1478
本文介绍了curl:(3)第3列中的[globbing]不良范围规范的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用curl在solr中为简单的json数据建立索引.当我使用命令时,它说

Im trying to index a simple json data in solr using curl. When i use the command, it says

"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等,但是每次都出现诸如非法端口号之类的错误时.谁能帮忙吗?

I have tried removing quotes, tried -g and --globoff etc but every time there are errors like illegal port number. Can anyone please help?

推荐答案

添加多个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"
      }
    ]'

这篇关于curl:(3)第3列中的[globbing]不良范围规范的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆