lucene-solr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Klaas (JIRA)" <>
Subject [jira] Updated: (SOLR-54) Invalid XML response returned when adding a document with a field not declared in solrconfig.xml
Date Tue, 07 Nov 2006 03:17:37 GMT
     [ ]

Mike Klaas updated SOLR-54:

    Attachment: autocommit_patch.diff

Previous patch was a little brain dead when it came to handling errors in multi-doc add commands.
 Now it will only send a single <result> on success or error.

This code could be cleaned up considerably if it were not important to try to "clean up" the
xml stream by continuing to read on error (SolrCore:699).  I could see this being useful if
solr could continue adding documents after erroring out on one, but we read to the send of
the stream anyway.

> Invalid XML response returned when adding a  document with a field not declared in solrconfig.xml
> -------------------------------------------------------------------------------------------------
>                 Key: SOLR-54
>                 URL:
>             Project: Solr
>          Issue Type: Bug
>         Environment: Tomcat 5.17 / Windows XP
>            Reporter: Przemyslaw Brzozowski
>         Attachments: autocommit_patch.diff
> Below we have a documents with three fields. One of them 'aaa'
> is not defined in solrconfig.xml:
> <add>
>  <doc>
>    <field name="type">invoice</field>
>    <field name="aaa">bbb</field>
>    <field name="internal_id">10E3B793A84559081D1EF0BA6BD0BB5E1417573EC5D</field>
>  </doc>
> </add>
> We get an error that resembles an xml but it is not because it has no root tag:
> <result status="400">ERROR:unknown field 'aaa'</result><result status="1">org.xmlpull.v1.XmlPullParserException:
expected START_TAG or END_TAG not END_DOCUMENT (position: END_DOCUMENT seen ...&lt;/doc&gt;\n&lt;/add&gt;\n...
>    at org.xmlpull.mxp1.MXParser.nextTag(
>    at org.apache.solr.core.SolrCore.update(
>    at org.apache.solr.servlet.SolrUpdateServlet.doPost(
>    at javax.servlet.http.HttpServlet.service(
>    at javax.servlet.http.HttpServlet.service(
>    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
>    at org.apache.catalina.core.ApplicationFilterChain.doFilter(
>    at org.apache.catalina.core.StandardWrapperValve.invoke(
>    at org.apache.catalina.core.StandardContextValve.invoke(
>    at org.apache.catalina.core.StandardHostValve.invoke(
>    at org.apache.catalina.valves.ErrorReportValve.invoke(
>    at org.apache.catalina.core.StandardEngineValve.invoke(
>    at org.apache.catalina.connector.CoyoteAdapter.service(
>    at org.apache.coyote.http11.Http11Processor.process(
>    at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(
>    at
>    at
>    at org.apache.tomcat.util.threads.ThreadPool$
>    at
> </result> 

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:


View raw message