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 Kirk Beers <ki...@nald.ca> on 2008/01/08 16:58:57 UTC
Status 500 - ParseError at [row,col]:[1,1] Message Content is not
allowed in Prolog
Hi,
I am new to Lucene and even newer to Solr and I am attempting to setup
Solr to fit our needs. I am using the Jan 7, 2008 build. I have updated
the schema.xml fields to reflect our preferences:
<field name="entryId" type="string" indexed="true" stored="true"
required="true"/>
<field name="title" type="string" indexed="true" stored="true"
required="true"/>
<field name="link" type="string" indexed="true" stored="false"
required="false"/>
<field name="content" type="text" indexed="true" stored="false"
required="false"/>
<field name="summary" type="text" indexed="true" stored="false"
required="false"/>
<field name="author" type="string" indexed="true" stored="false"
required="false"/>
I set <uniqueKey>entryId</uniqueKey> and set
<defaultSearchField>title</defaultSearchField> then I set these values:
<copyField source="entryId" dest="title"/>
<copyField source="title" dest="text"/>
<copyField source="link" dest="text"/>
<copyField source="content" dest="text"/>
<copyField source="summary" dest="text"/>
<copyField source="author" dest="text"/>
When I run the following :
curl http://localhost:8080/solr/update -H "Content-Type:text/xml"
--data-binary '/<add allowDups="false" overwriteCommitted="true"
overwritePending="true"><doc><field name="entryId">0001</field><field
name="title">Title</field><field name="content">It was the best of times
it was the worst of times blah blah blah</field></doc></add>'
This resulted in the following error:
The server encountered an internal error (ParseError at [row,col]:[1,1]
Message: Content is not allowed in prolog.
Any direction would be greatly appreciated.
Thanks in advance.
Re: Status 500 - ParseError at [row,col]:[1,1] Message Content is
not allowed in Prolog
Posted by Ryan McKinley <ry...@gmail.com>.
try it without and see how you do...
I just updated the wiki
Kirk Beers wrote:
> Brian Whitman wrote:
>>
>> On Jan 8, 2008, at 10:58 AM, Kirk Beers wrote:
>>
>>>
>>> curl http://localhost:8080/solr/update -H "Content-Type:text/xml"
>>> --data-binary '/<add allowDups="false" overwriteCommitted="true"
>>> overwritePending="true"><doc><field name="entryId">0001</field><field
>>> name="title">Title</field><field name="content">It was the best of
>>> times it was the worst of times blah blah blah</field></doc></add>'
>>
>>
>> Why the / after the first single quote?
>>
>> Hi Brian,
> I found that on the Wiki at
> http://wiki.apache.org/solr/UpdateXmlMessages#head-3dfbf90fbc69f168ab6f3389daf68571ad614bef
> under the title: Updating a Data Record via curl. I removed it and now
> have the following:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <response>
> <lst name="responseHeader"><int name="status">0</int><int
> name="QTime">122</int></lst><str name="WARNING">This response format is
> experimental. It is likely to change in the future.</str>
> </response>
>
>
>
Re: Status 500 - ParseError at [row,col]:[1,1] Message Content is
not allowed in Prolog
Posted by Kirk Beers <ki...@nald.ca>.
Brian Whitman wrote:
>
>> I found that on the Wiki at
>> http://wiki.apache.org/solr/UpdateXmlMessages#head-3dfbf90fbc69f168ab6f3389daf68571ad614bef
>> under the title: Updating a Data Record via curl. I removed it and
>> now have the following:
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <response>
>> <lst name="responseHeader"><int name="status">0</int><int
>> name="QTime">122</int></lst><str name="WARNING">This response format
>> is experimental. It is likely to change in the future.</str>
>> </response>
>>
>
> Seems to be an error in the wiki. I changed it. Commit and you should
> see your test document in queries.
>
>
Brian,
It worked like a charm! Thanks.
Re: Status 500 - ParseError at [row,col]:[1,1] Message Content is not allowed in Prolog
Posted by Brian Whitman <br...@variogr.am>.
> I found that on the Wiki at http://wiki.apache.org/solr/UpdateXmlMessages#head-3dfbf90fbc69f168ab6f3389daf68571ad614bef
> under the title: Updating a Data Record via curl. I removed it and
> now have the following:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <response>
> <lst name="responseHeader"><int name="status">0</int><int
> name="QTime">122</int></lst><str name="WARNING">This response format
> is experimental. It is likely to change in the future.</str>
> </response>
>
Seems to be an error in the wiki. I changed it. Commit and you should
see your test document in queries.
Re: Status 500 - ParseError at [row,col]:[1,1] Message Content is
not allowed in Prolog
Posted by Kirk Beers <ki...@nald.ca>.
Brian Whitman wrote:
>
> On Jan 8, 2008, at 10:58 AM, Kirk Beers wrote:
>
>>
>> curl http://localhost:8080/solr/update -H "Content-Type:text/xml"
>> --data-binary '/<add allowDups="false" overwriteCommitted="true"
>> overwritePending="true"><doc><field name="entryId">0001</field><field
>> name="title">Title</field><field name="content">It was the best of
>> times it was the worst of times blah blah blah</field></doc></add>'
>
>
> Why the / after the first single quote?
>
> Hi Brian,
I found that on the Wiki at
http://wiki.apache.org/solr/UpdateXmlMessages#head-3dfbf90fbc69f168ab6f3389daf68571ad614bef
under the title: Updating a Data Record via curl. I removed it and now
have the following:
<?xml version="1.0" encoding="UTF-8"?>
<response>
<lst name="responseHeader"><int name="status">0</int><int
name="QTime">122</int></lst><str name="WARNING">This response format is
experimental. It is likely to change in the future.</str>
</response>
Re: Status 500 - ParseError at [row,col]:[1,1] Message Content is not allowed in Prolog
Posted by Brian Whitman <br...@variogr.am>.
On Jan 8, 2008, at 10:58 AM, Kirk Beers wrote:
>
> curl http://localhost:8080/solr/update -H "Content-Type:text/xml" --
> data-binary '/<add allowDups="false" overwriteCommitted="true"
> overwritePending="true"><doc><field name="entryId">0001</
> field><field name="title">Title</field><field name="content">It was
> the best of times it was the worst of times blah blah blah</field></
> doc></add>'
Why the / after the first single quote?