lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryan McKinley <ryan...@gmail.com>
Subject Re:
Date Sun, 02 Dec 2007 22:43:26 GMT
hymm, looks like an issue with command line curl and '%26'

When I run:
curl 
http://localhost:8983/solr/debug/dump?header=true%26seperator=%7C%26encapsulator=%22%26commit=true%26stream.file=import/homes.csv\&indent=true

you can see the params it parsed:
<lst name="params">
  <str name="echoParams">explicit</str>
  <str name="echoHandler">true</str>
  <str name="indent">true</str>
  <str 
name="header">true&amp;seperator=|&amp;encapsulator="&amp;commit=true&amp;stream.file=import/homes.csv</str>
</lst>

try \& rather then %26

ryan




Andrew Nagy wrote:
> Sorry for not explaining my self clearly: I have header=true as you can see from the
curl command and there is a header line in the csv file.
> 
> And sorry for the missing subject line.
> 
> Andrew
> ________________________________________
> From: Ryan McKinley [ryantxu@gmail.com]
> Sent: Sunday, December 02, 2007 5:15 PM
> To: solr-user@lucene.apache.org
> Subject: Re:
> 
> Andrew Nagy wrote:
>> Hello - I am trying out the CSV importer and am curious with an error that I am consistently
running into.  What am I doing incorrectly here?  I am importing a pipe delimited CSV file
with quotes encapsulation.
>>
>> Thanks
>> Andrew
>>
>> curl http://localhost:8080/solr/update/csv?header=true%26seperator=%7C%26encapsulator=%22%26commit=true%26stream.file=import/homes.csv
>>
>> <html>
>> <head>
>> <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
>> <title>Error 400 </title>
>> </head>
>> <body><h2>HTTP ERROR: 400</h2><pre>CSVLoader: must specify
fieldnames=&lt;fields&gt;* or header=true</pre>
>> <p>RequestURI=/solr/update/csv</p><p><i><small><a
href="http://jetty.mortbay.org/">Powered by Jetty://</a></small></i></p><br/>
>>
> 
> take a look at the error:
> 
> "CSVLoader: must specify fieldnames=&lt;fields&gt;* or header=true"
> 
> either list the fieldnames or use the 1st line as the field names
> (header=true)
> 
> ryan
> 
> 
> 
> 
> 


Mime
View raw message