lucene-solr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Klaas (JIRA)" <j...@apache.org>
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
     [ http://issues.apache.org/jira/browse/SOLR-54?page=all ]

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: http://issues.apache.org/jira/browse/SOLR-54
>             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...
@9:1)
>    at org.xmlpull.mxp1.MXParser.nextTag(MXParser.java:1083)
>    at org.apache.solr.core.SolrCore.update(SolrCore.java:681)
>    at org.apache.solr.servlet.SolrUpdateServlet.doPost(SolrUpdateServlet.java:52)
>    at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
>    at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
>    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
>    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
>    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
>    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
>    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
>    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
>    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
>    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
>    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
>    at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
>    at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
>    at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
>    at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
>    at java.lang.Thread.run(Thread.java:595)
> </result> 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message