如何在ubuntu上使用包含分号分隔符的csv文件更新solr?

如何在ubuntu上使用包含分号分隔符的csv文件更新solr?,ubuntu,curl,csv,solr,Ubuntu,Curl,Csv,Solr,我尝试使用curl语法: curl http://localhost:8983/solr/update/csv?stream.file=/usr/local/src/apache-solr-3.6.0/example/exampledocs/my+file.csv&separator=&stream.contentType=文本/普通;字符集=utf-8 没有运气。 我得到: -bash:意外标记“;&”附近出现语法错误 如果我尝试用%3b编码分号,它会说: [1] 16319 [2] 1632

我尝试使用curl语法: curl http://localhost:8983/solr/update/csv?stream.file=/usr/local/src/apache-solr-3.6.0/example/exampledocs/my+file.csv&separator=&stream.contentType=文本/普通;字符集=utf-8 没有运气。 我得到: -bash:意外标记“;&”附近出现语法错误

如果我尝试用%3b编码分号,它会说:

[1] 16319 [2] 16320 -bash:stream.contentType=text/plain:没有这样的文件或目录 [2] +完成分隔符=%3b administrator@host:/usr/local/src/apache-solr-3.6.0/example/exampledocs$

<html>  
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
<title>Error 400 undefined field: "field1;field2;field3;field4"</title>
</head>
<body><h2>HTTP ERROR 400</h2>
<p>Problem accessing /solr/update/csv. Reason:
<pre>    undefined field: "field1;field2;field3;field4"</pre></p><hr /><i><small>Powered by Jetty://</small></i><br/>
如您所见,分隔符未被解码,以下参数未正确解析

有人能帮我把分号正确地编码吗? 或者有没有其他方法可以在ubuntu上用csv文件更新solr?

实际上,用双引号将其括起来解决了这个问题:

卷曲http://localhost:8983/solr/update/csv?stream.file=/usr/local/src/apache-solr-3.6.0/example/exampledocs/my+file.csv&separator=&stream.contentType=文本/普通;字符集=utf-8

奇怪的是,为什么它需要一个+来表示空的空间,而在重复引用它的时候