You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by phil cryer <ph...@cryer.us> on 2008/12/12 05:37:29 UTC

importing csv into Solr

I can't import csv files into Solr - I've gone through the wiki and
all the examples online, but I've hit the same error - what am I'm
doing wrong?

curl 'http://localhost:8080/solr/update/csv?commit=true' --data-binary
@green.csv -H 'Content-type:text/plain; charset=utf-8' -s -u
solrAdmin:solrAdmin

<html><head><title>Apache Tomcat/5.5.26 - Error
report</title><style><!--H1
{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;}
H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;}
H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;}
BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;}
B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;}
P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A
{color : black;}A.name {color : black;}HR {color :
#525D76;}--></style> </head><body><h1>HTTP Status 400 - undefined
field color</h1><HR size="1" noshade="noshade"><p><b>type</b> Status
report</p><p><b>message</b> <u>undefined field
color</u></p><p><b>description</b> <u>The request sent by the client
was syntactically incorrect (undefined field color).</u></p><HR
size="1" noshade="noshade"><h3>Apache
Tomcat/5.5.26</h3></body></html>[11:23:51]

I've also tried to stream the csv in:

curl http://localhost:8080/solr/update/csv?stream.file=green.csv -s -u
solrAdmin:solrAdmin

<html><head><title>Apache Tomcat/5.5.26 - Error
report</title><style><!--H1
{font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;}
H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;}
H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;}
BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;}
B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;}
P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A
{color : black;}A.name {color : black;}HR {color :
#525D76;}--></style> </head><body><h1>HTTP Status 400 - undefined
field color</h1><HR size="1" noshade="noshade"><p><b>type</b> Status
report</p><p><b>message</b> <u>undefined field
color</u></p><p><b>description</b> <u>The request sent by the client
was syntactically incorrect (undefined field color).</u></p><HR
size="1" noshade="noshade"><h3>Apache Tomcat/5.5.26</h3></body></html>

Thanks

P

Re: importing csv into Solr

Posted by Yonik Seeley <yo...@apache.org>.
The error message is saying "undefined field color"
Is that field defined in your schema?  If not, you need to define it,
or map the color field to another field during import.

-Yonik


On Thu, Dec 11, 2008 at 11:37 PM, phil cryer <ph...@cryer.us> wrote:
> I can't import csv files into Solr - I've gone through the wiki and
> all the examples online, but I've hit the same error - what am I'm
> doing wrong?
>
> curl 'http://localhost:8080/solr/update/csv?commit=true' --data-binary
> @green.csv -H 'Content-type:text/plain; charset=utf-8' -s -u
> solrAdmin:solrAdmin
>
> <html><head><title>Apache Tomcat/5.5.26 - Error
> report</title><style><!--H1
> {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;}
> H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;}
> H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;}
> BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;}
> B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;}
> P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A
> {color : black;}A.name {color : black;}HR {color :
> #525D76;}--></style> </head><body><h1>HTTP Status 400 - undefined
> field color</h1><HR size="1" noshade="noshade"><p><b>type</b> Status
> report</p><p><b>message</b> <u>undefined field
> color</u></p><p><b>description</b> <u>The request sent by the client
> was syntactically incorrect (undefined field color).</u></p><HR
> size="1" noshade="noshade"><h3>Apache
> Tomcat/5.5.26</h3></body></html>[11:23:51]
>
> I've also tried to stream the csv in:
>
> curl http://localhost:8080/solr/update/csv?stream.file=green.csv -s -u
> solrAdmin:solrAdmin
>
> <html><head><title>Apache Tomcat/5.5.26 - Error
> report</title><style><!--H1
> {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;}
> H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;}
> H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;}
> BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;}
> B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;}
> P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A
> {color : black;}A.name {color : black;}HR {color :
> #525D76;}--></style> </head><body><h1>HTTP Status 400 - undefined
> field color</h1><HR size="1" noshade="noshade"><p><b>type</b> Status
> report</p><p><b>message</b> <u>undefined field
> color</u></p><p><b>description</b> <u>The request sent by the client
> was syntactically incorrect (undefined field color).</u></p><HR
> size="1" noshade="noshade"><h3>Apache Tomcat/5.5.26</h3></body></html>
>
> Thanks
>
> P
>