lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Burkamp, Christian" <>
Subject AW: Help with Setup
Date Fri, 27 Apr 2007 08:24:37 GMT

You can use curl with a file if you put the "@" char in front of it's name. (Otherwise curl
expects the data on the commandline).

curl http://localhost:8080/solr/update --data-binary @articles.xml

-----Urspr√ľngliche Nachricht-----
Von: Sean Bowman [] 
Gesendet: Donnerstag, 26. April 2007 23:32
Betreff: Re: Help with Setup


curl http://localhost:8080/solr/update --data-binary '<add><doc><field name="id">2008</field><field
name="storyText">The Rain in Spain Falls Mainly In The Plain</

And see if that works.  I don't think curl lets you put a filename in for the --data-binary
parameter.  Has to be the actual data, though something like this might also work:

curl http://localhost:8080/solr/update --data-binary `cat articles.xml`

Those are open ticks, not apostrophes.

On 4/26/07, Ryan McKinley <> wrote:
> >
> > paladin:/data/solr mtorgler1$ curl http://localhost:8080/solr/update 
> > --data-binary articles.xml <result 
> > status="1">org.xmlpull.v1.XmlPullParserException: only whitespace 
> > content allowed before start tag and not a (position:
> > START_DOCUMENT seen a... @1:1)
> >         at org.xmlpull.mxp1.MXParser.parseProlog(
> >         at org.xmlpull.mxp1.MXParser.nextImpl(
> My guess is you have some funny character at the start of the document.
>   I have seen funny chars show show up when i edit a UTF-8 file and 
> save it as ASCII.  If you don't see it in your normal editor, try a 
> different one.
> If that does not help, start with the working example and add modify a 
> little bit at a time...
> ryan

View raw message