Thanks for your reply.

This is the curl command that I run, with the "--trace -" output.


PS C:\curl> .\curl 'http://localhost:8983/solr/collection1/update/json/docs?
split=/|/orgs
<http://localhost:8983/edm/emails6/update/json/docs?split=/%7C/orgs>'
 -H 'Content-type:application/j
son' -d ' {   "id":"1",   "name_s": "Joe Smith",   "phone_s": 876876687,
 "orgs": [     {       "name1_s": "Microsoft",
       "city_s": "Seattle",       "zip_s": 98052},     {       "name1_s":
"Apple",       "city_s": "Cupertino",       "z
ip_s": 95014}   ] }' --trace -

== Info:   Trying ::1...
== Info: TCP_NODELAY set
== Info: Connected to localhost (::1) port 8983 (#0)
=> Send header, 172 bytes (0xac)
0000: 50 4f 53 54 20 2f 65 64 6d 2f 65 6d 61 69 6c 73 POST /edm/emails
0010: 36 2f 75 70 64 61 74 65 2f 6a 73 6f 6e 2f 64 6f 6/update/json/do
0020: 63 73 3f 73 70 6c 69 74 3d 2f 7c 2f 6f 72 67 73 cs?split=/|/orgs
0030: 20 48 54 54 50 2f 31 2e 31 0d 0a 48 6f 73 74 3a  HTTP/1.1..Host:
0040: 20 6c 6f 63 61 6c 68 6f 73 74 3a 38 39 38 33 0d  localhost:8983.
0050: 0a 55 73 65 72 2d 41 67 65 6e 74 3a 20 63 75 72 .User-Agent: cur
0060: 6c 2f 37 2e 35 32 2e 31 0d 0a 41 63 63 65 70 74 l/7.52.1.
<http://7.52.0.1/>.Accept
0070: 3a 20 2a 2f 2a 0d 0a 43 6f 6e 74 65 6e 74 2d 74 : */*..Content-t
0080: 79 70 65 3a 61 70 70 6c 69 63 61 74 69 6f 6e 2f ype:application/
0090: 6a 73 6f 6e 0d 0a 43 6f 6e 74 65 6e 74 2d 4c 65 json..Content-Le
00a0: 6e 67 74 68 3a 20 32 34 0d 0a 0d 0a             ngth: 24....
=> Send data, 24 bytes (0x18)
0000: 20 7b 20 20 20 69 64 3a 31 2c 20 20 20 6e 61 6d  {   id:1,   nam
0010: 65 5f 73 3a 20 4a 6f 65                         e_s: Joe
== Info: upload completely sent off: 24 out of 24 bytes
<= Recv header, 26 bytes (0x1a)
0000: 48 54 54 50 2f 31 2e 31 20 34 30 30 20 42 61 64 HTTP/1.1 400 Bad
0010: 20 52 65 71 75 65 73 74 0d 0a                    Request..
<= Recv header, 40 bytes (0x28)
0000: 43 6f 6e 74 65 6e 74 2d 54 79 70 65 3a 20 74 65 Content-Type: te
0010: 78 74 2f 70 6c 61 69 6e 3b 63 68 61 72 73 65 74 xt/plain;charset
0020: 3d 75 74 66 2d 38 0d 0a                         =utf-8..
<= Recv header, 21 bytes (0x15)
0000: 43 6f 6e 74 65 6e 74 2d 4c 65 6e 67 74 68 3a 20 Content-Length:
0010: 33 32 33 0d 0a                                  323..
<= Recv header, 2 bytes (0x2)
0000: 0d 0a                                           ..
<= Recv data, 323 bytes (0x143)
0000: 7b 0a 20 20 22 72 65 73 70 6f 6e 73 65 48 65 61 {.  "responseHea
0010: 64 65 72 22 3a 7b 0a 20 20 20 20 22 73 74 61 74 der":{.    "stat
0020: 75 73 22 3a 34 30 30 2c 0a 20 20 20 20 22 51 54 us":400,.    "QT
0030: 69 6d 65 22 3a 30 7d 2c 0a 20 20 22 65 72 72 6f ime":0},.  "erro
0040: 72 22 3a 7b 0a 20 20 20 20 22 6d 65 74 61 64 61 r":{.    "metada
0050: 74 61 22 3a 5b 0a 20 20 20 20 20 20 22 65 72 72 ta":[.      "err
0060: 6f 72 2d 63 6c 61 73 73 22 2c 22 6f 72 67 2e 61 or-class","org.a
0070: 70 61 63 68 65 2e 73 6f 6c 72 2e 63 6f 6d 6d 6f pache.solr.commo
0080: 6e 2e 53 6f 6c 72 45 78 63 65 70 74 69 6f 6e 22 n.SolrException"
0090: 2c 0a 20 20 20 20 20 20 22 72 6f 6f 74 2d 65 72 ,.      "root-er
00a0: 72 6f 72 2d 63 6c 61 73 73 22 2c 22 6f 72 67 2e ror-class","org.
00b0: 61 70 61 63 68 65 2e 73 6f 6c 72 2e 63 6f 6d 6d apache.solr.comm
00c0: 6f 6e 2e 53 6f 6c 72 45 78 63 65 70 74 69 6f 6e on.SolrException
00d0: 22 5d 2c 0a 20 20 20 20 22 6d 73 67 22 3a 22 43 "],.    "msg":"C
00e0: 61 6e 6e 6f 74 20 70 61 72 73 65 20 70 72 6f 76 annot parse prov
00f0: 69 64 65 64 20 4a 53 4f 4e 3a 20 45 78 70 65 63 ided JSON: Expec
0100: 74 65 64 20 27 2c 27 20 6f 72 20 27 7d 27 3a 20 ted ',' or '}':
0110: 63 68 61 72 3d 28 45 4f 46 29 2c 70 6f 73 69 74 char=(EOF),posit
0120: 69 6f 6e 3d 32 34 20 41 46 54 45 52 3d 27 27 22 ion=24 AFTER=''"
0130: 2c 0a 20 20 20 20 22 63 6f 64 65 22 3a 34 30 30 ,.    "code":400
0140: 7d 7d 0a                                        }}.
{
  "responseHeader":{
    "status":400,
    "QTime":0},
  "error":{
    "metadata":[
      "error-class","org.apache.solr.common.SolrException",
      "root-error-class","org.apache.solr.common.SolrException"],
    "msg":"Cannot parse provided JSON: Expected ',' or '}':
char=(EOF),position=24 AFTER=''",
    "code":400}}
== Info: Curl_http_done: called premature == 0
== Info: Connection #0 to host localhost left intact
curl: (3) [globbing] bad range specification in column 39


Regards,
Edwin


On 23 March 2018 at 06:45, Zheng Lin Edwin Yeo <edwinye...@gmail.com> wrote:

> Thanks for your reply.
>
>
>
> PS C:\curl> .\curl 'http://localhost:8983/edm/emails6/update/json/docs?
> split=/|/orgs'     -H 'Content-type:application/j
> son' -d ' {   "id":"1",   "name_s": "Joe Smith",   "phone_s": 876876687,
>  "orgs": [     {       "name1_s": "Microsoft",
>        "city_s": "Seattle",       "zip_s": 98052},     {       "name1_s":
> "Apple",       "city_s": "Cupertino",       "z
> ip_s": 95014}   ] }' --trace -
>
> == Info:   Trying ::1...
> == Info: TCP_NODELAY set
> == Info: Connected to localhost (::1) port 8983 (#0)
> => Send header, 172 bytes (0xac)
> 0000: 50 4f 53 54 20 2f 65 64 6d 2f 65 6d 61 69 6c 73 POST /edm/emails
> 0010: 36 2f 75 70 64 61 74 65 2f 6a 73 6f 6e 2f 64 6f 6/update/json/do
> 0020: 63 73 3f 73 70 6c 69 74 3d 2f 7c 2f 6f 72 67 73 cs?split=/|/orgs
> 0030: 20 48 54 54 50 2f 31 2e 31 0d 0a 48 6f 73 74 3a  HTTP/1.1..Host:
> 0040: 20 6c 6f 63 61 6c 68 6f 73 74 3a 38 39 38 33 0d  localhost:8983.
> 0050: 0a 55 73 65 72 2d 41 67 65 6e 74 3a 20 63 75 72 .User-Agent: cur
> 0060: 6c 2f 37 2e 35 32 2e 31 0d 0a 41 63 63 65 70 74 l/7.52.1..Accept
> 0070: 3a 20 2a 2f 2a 0d 0a 43 6f 6e 74 65 6e 74 2d 74 : */*..Content-t
> 0080: 79 70 65 3a 61 70 70 6c 69 63 61 74 69 6f 6e 2f ype:application/
> 0090: 6a 73 6f 6e 0d 0a 43 6f 6e 74 65 6e 74 2d 4c 65 json..Content-Le
> 00a0: 6e 67 74 68 3a 20 32 34 0d 0a 0d 0a             ngth: 24....
> => Send data, 24 bytes (0x18)
> 0000: 20 7b 20 20 20 69 64 3a 31 2c 20 20 20 6e 61 6d  {   id:1,   nam
> 0010: 65 5f 73 3a 20 4a 6f 65                         e_s: Joe
> == Info: upload completely sent off: 24 out of 24 bytes
> <= Recv header, 26 bytes (0x1a)
> 0000: 48 54 54 50 2f 31 2e 31 20 34 30 30 20 42 61 64 HTTP/1.1 400 Bad
> 0010: 20 52 65 71 75 65 73 74 0d 0a                    Request..
> <= Recv header, 40 bytes (0x28)
> 0000: 43 6f 6e 74 65 6e 74 2d 54 79 70 65 3a 20 74 65 Content-Type: te
> 0010: 78 74 2f 70 6c 61 69 6e 3b 63 68 61 72 73 65 74 xt/plain;charset
> 0020: 3d 75 74 66 2d 38 0d 0a                         =utf-8..
> <= Recv header, 21 bytes (0x15)
> 0000: 43 6f 6e 74 65 6e 74 2d 4c 65 6e 67 74 68 3a 20 Content-Length:
> 0010: 33 32 33 0d 0a                                  323..
> <= Recv header, 2 bytes (0x2)
> 0000: 0d 0a                                           ..
> <= Recv data, 323 bytes (0x143)
> 0000: 7b 0a 20 20 22 72 65 73 70 6f 6e 73 65 48 65 61 {.  "responseHea
> 0010: 64 65 72 22 3a 7b 0a 20 20 20 20 22 73 74 61 74 der":{.    "stat
> 0020: 75 73 22 3a 34 30 30 2c 0a 20 20 20 20 22 51 54 us":400,.    "QT
> 0030: 69 6d 65 22 3a 30 7d 2c 0a 20 20 22 65 72 72 6f ime":0},.  "erro
> 0040: 72 22 3a 7b 0a 20 20 20 20 22 6d 65 74 61 64 61 r":{.    "metada
> 0050: 74 61 22 3a 5b 0a 20 20 20 20 20 20 22 65 72 72 ta":[.      "err
> 0060: 6f 72 2d 63 6c 61 73 73 22 2c 22 6f 72 67 2e 61 or-class","org.a
> 0070: 70 61 63 68 65 2e 73 6f 6c 72 2e 63 6f 6d 6d 6f pache.solr.commo
> 0080: 6e 2e 53 6f 6c 72 45 78 63 65 70 74 69 6f 6e 22 n.SolrException"
> 0090: 2c 0a 20 20 20 20 20 20 22 72 6f 6f 74 2d 65 72 ,.      "root-er
> 00a0: 72 6f 72 2d 63 6c 61 73 73 22 2c 22 6f 72 67 2e ror-class","org.
> 00b0: 61 70 61 63 68 65 2e 73 6f 6c 72 2e 63 6f 6d 6d apache.solr.comm
> 00c0: 6f 6e 2e 53 6f 6c 72 45 78 63 65 70 74 69 6f 6e on.SolrException
> 00d0: 22 5d 2c 0a 20 20 20 20 22 6d 73 67 22 3a 22 43 "],.    "msg":"C
> 00e0: 61 6e 6e 6f 74 20 70 61 72 73 65 20 70 72 6f 76 annot parse prov
> 00f0: 69 64 65 64 20 4a 53 4f 4e 3a 20 45 78 70 65 63 ided JSON: Expec
> 0100: 74 65 64 20 27 2c 27 20 6f 72 20 27 7d 27 3a 20 ted ',' or '}':
> 0110: 63 68 61 72 3d 28 45 4f 46 29 2c 70 6f 73 69 74 char=(EOF),posit
> 0120: 69 6f 6e 3d 32 34 20 41 46 54 45 52 3d 27 27 22 ion=24 AFTER=''"
> 0130: 2c 0a 20 20 20 20 22 63 6f 64 65 22 3a 34 30 30 ,.    "code":400
> 0140: 7d 7d 0a                                        }}.
> {
>   "responseHeader":{
>     "status":400,
>     "QTime":0},
>   "error":{
>     "metadata":[
>       "error-class","org.apache.solr.common.SolrException",
>       "root-error-class","org.apache.solr.common.SolrException"],
>     "msg":"Cannot parse provided JSON: Expected ',' or '}':
> char=(EOF),position=24 AFTER=''",
>     "code":400}}
> == Info: Curl_http_done: called premature == 0
> == Info: Connection #0 to host localhost left intact
> curl: (3) [globbing] bad range specification in column 39
>
> Regards,
> Edwin
>
> On 23 March 2018 at 03:49, Yonik Seeley <ysee...@gmail.com> wrote:
>
>> It looks like a curl globbing issue from the curl error message you
>> included:
>> "curl: (3) [globbing] bad range specification in column 39"
>>
>> You can try turning off curl globbing with the -g param.
>> That may not be the only issue though, as the command shown shouldn't
>> have triggered curl globbing.  Perhaps you simplified it or redacted
>> some info before posting?
>>
>> -Yonik
>>
>
>

Reply via email to