Perfect!  That did it.

Thanks for debugging this with me :)

Andrew
________________________________________
From: Ryan McKinley [EMAIL PROTECTED]
Sent: Sunday, December 02, 2007 7:10 PM
To: solr-user@lucene.apache.org
Subject: Re:

hymmm - give it a try without specifying "header=true"

Looks like if you don't specify header=true, it defaults to true - but
if you do, it throws an error.

I think there may be a bug... Yonik, should line 243 be:

   } else if (!hasHeader) {
              ^!!!
ryan


Andrew Nagy wrote:
> Ryan, i didn't know there was a debugger - this could come in handy for other 
> things.  Thanks!
>
> I tried it out and it looks like everything is being parsed correctly when 
> passing the url in quotes:
>
> curl 
> "http://localhost:8080/solr/debug/dump?header=true&separator=%7C&encapsulator=%22&commit=true";
>  --data-binary @homes.csv -H 'Content-type:text/plain; charset=utf-8'
> <?xml version="1.0" encoding="UTF-8"?>
> <response>
> <lst name="responseHeader"><int name="status">0</int><int 
> name="QTime">0</int><str 
> name="handler">org.apache.solr.handler.DumpRequestHandler</str><lst 
> name="params"><str name="header">true</str><str name="separator">|</str><str 
> name="commit">true</str><str name="encapsulator">"</str></lst></lst><lst 
> name="params"><str name="echoHandler">true</str><str 
> name="echoParams">explicit</str><str name="header">true</str><str 
> name="separator">|</str><str name="commit">true</str><str 
> name="encapsulator">"</str></lst><lst name="context"><str 
> name="path">/debug/dump</str></lst>
> </response>
>
> I tried again with update/csv and same error occurs:
> curl 
> "http://localhost:8080/solr/update/csv?header=true&separator=%7C&encapsulator=%22&commit=true";
>  --data-binary @homes.csv -H 'Content-type:text/plain; charset=utf-8'
> <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/>
>

Reply via email to