Hi Jeff,

This is a log that I got after runnning SolrSharp example. I think example program posts not properly formatted xml. I'm running Solr on Windows XP, Java 1.5. Are those settings could be the problem?

Thank you
Michael

Jun 19, 2007 5:26:39 PM org.apache.solr.core.SolrException log
SEVERE: org.apache.solr.core.SolrException: missing content stream
at org.apache.solr.handler.XmlUpdateRequestHandler.handleRequestBody(XmlUpdateRequestHandler.java:75) at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:77)
       at org.apache.solr.core.SolrCore.execute(SolrCore.java:658)
at org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:191) at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:159) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1089) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:365) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405) at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:211) at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
       at org.mortbay.jetty.Server.handle(Server.java:285)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:502) at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:835)
       at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:641)
       at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:202)
       at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:378)
at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:226) at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)

Jun 19, 2007 5:26:39 PM org.apache.solr.core.SolrCore execute
INFO: /update/ <?xml version="1.0"+encoding%3D"utf-8"?><add+xmlns:xsi%3D"http://www.w3.org/2001/XMLSchema-instance"+xmln
s:xsd%3D"http://www.w3.org/2001/XMLSchema";><doc><field+name%3D"id">101</field><field+name%3D"name">One+oh+one</field><fi
eld+name%3D"manu">Sony</field><field+name%3D"cat">Electronics</field><field+name%3D"cat">Computer</field><field+name%3D"
features">Good</field><field+name%3D"features">Fast</field><field+name%3D"features">Cheap</field><field+name%3D"includes
">USB+cable</field><field+name%3D"weight">1.234</field><field+name%3D"price">99.99</field><field+name%3D"popularity">1</
field><field+name%3D"inStock">True</field></doc></add> 0 16



----- Original Message ----- From: "Jeff Rodenburg" <[EMAIL PROTECTED]>
To: "Michael Plax" <[EMAIL PROTECTED]>; <solr-user@lucene.apache.org>
Sent: Wednesday, June 20, 2007 8:42 AM
Subject: Re: SolrSharp example


Hi Michael -

Moving this conversations to the general solr mailing list...


 1. SolrSharp example solution works with schema.xml from
apache-solr-1.1.0-incubating.    If I'm using schema.xml from
apache-solr-1.2.0 example program doesn't update index...

I didn't realize the solr 1.2 release code sample schema.xml was different
from the solr 1.1 version.  In my implementation, I had solr 1.1 already
installed and upgraded to 1.2 by replacing the war file (per the
instructions in solr.)  So, the example code is geared to go against
the 1.1schema.

For the example code, adding the "timestamp" field in the
ExampleIndexDocument public constructor such as:

           this.Add(new IndexFieldValue("timestamp", DateTime.Now.ToString
("s")+"Z")));

will take care of the solr 1.2 schema invalidation issue.

The addition of the @default attribute on this field in the schema is not
presently accommodated in the validation routine. If I'm not mistaken, the default attribute value will be applied for all documents without that field present in the xml payload. This would imply that any field with a default
attribute is not required for any implemented UpdateIndexDocument.  I'll
look into this further.


2. When I run example with schema.xml from
apache-solr-1.1.0-incubating program
throw Exception

Hmmm, can't really help you with this one.  It sounds as if solr is
incurring an error when the xml is posted to the server.  Try the standard
step-through troubleshooting routines to see what messages are being passed
back from the server.



-- j


Reply via email to