AW: Help with Setup
Hi, 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 [mailto:[EMAIL PROTECTED] Gesendet: Donnerstag, 26. April 2007 23:32 An: solr-user@lucene.apache.org Betreff: Re: Help with Setup Try: curl http://localhost:8080/solr/update --data-binary 'adddocfield name=id2008/fieldfield name=storyTextThe Rain in Spain Falls Mainly In The Plain/ field/doc/add' 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 [EMAIL PROTECTED] wrote: paladin:/data/solr mtorgler1$ curl http://localhost:8080/solr/update --data-binary articles.xml result status=1org.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(MXParser.java:1519) at org.xmlpull.mxp1.MXParser.nextImpl(MXParser.java:1395) 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
Re: Help with Setup
I thought that too, I opened it up via vi and nothing was there. Usually if I have a PC encoding issue ( I use EditPlus as a text editor) it will show up in vi. On Apr 26, 2007, at 5:19 PM, Ryan McKinley wrote: paladin:/data/solr mtorgler1$ curl http://localhost:8080/solr/ update --data-binary articles.xml result status=1org.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(MXParser.java:1519) at org.xmlpull.mxp1.MXParser.nextImpl(MXParser.java:1395) 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
Re: Help with Setup
Wrapping is purely via email, the text xml is single line (on purpose, originally it was a 3 paragraph field that was html encoded, I simplified the text as a 'just in case') On Apr 26, 2007, at 5:09 PM, Cody Caughlan wrote: For the storyText field element, is that wrapping only in this email or is the source document wrapping like that as well? /cody On 4/26/07, Mike [EMAIL PROTECTED] wrote: Greetings I've gotten SOLR installed and the admin screens working. At this point I'm just trying to get my add record to be grabbed by the SOLR update process, but unfortunately, I'm getting a whitespace error that I could use some pointers on. I've searched the site and found similar errors but no tips that could help me out. paladin:/data/solr mtorgler1$ curl http://localhost:8080/solr/update --data-binary articles.xml result status=1org.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(MXParser.java:1519) at org.xmlpull.mxp1.MXParser.nextImpl(MXParser.java:1395) at org.xmlpull.mxp1.MXParser.next(MXParser.java:1093) at org.xmlpull.mxp1.MXParser.nextTag(MXParser.java:1078) at org.apache.solr.core.SolrCore.update(SolrCore.java:661) at org.apache.solr.servlet.SolrUpdateServlet.doPost (SolrUpdateServlet.java:53) 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:613) --- My schema.xml is pretty straight forward, I didn't modify the types section, and modified the fields to the following fields field name=id type=string indexed=true stored=true/ field name=storyText type=text indexed=true stored=true/ /fields !-- field to use to determine and enforce document uniqueness. -- uniqueKeyid/uniqueKey !-- field for the QueryParser to use when an explicit fieldname is absent -- defaultSearchFieldstoryText/defaultSearchField !-- SolrQueryParser configuration: defaultOperator=AND|OR -- solrQueryParser defaultOperator=OR/ - My example document at this time is a singe doc (I've tried both with and without xml declaration) add doc field name=id2008/field field name=storyTextThe Rain in Spain Falls Mainly In The Plain/ field /doc /add What else am I missing? My Tomcat installation is 5.5.20 My SOLR info is Solr Specification Version: 1.1.0 Solr Implementation Version: 1.1.0-incubating - Yonik - 2006-12-17 17:09:54 Lucene Specification Version: nightly Lucene Implementation Version: build 2006-11-15 java.vm.version = 1.5.0_07-87 Any and all help is appreciated and will be rewarded with a warm glowing feeling of accomplishment! Thx!
Re: Help with Setup
That's an awesome tip to keep in ol' toolbox, Christian.
Re: AW: Help with Setup
On Apr 27, 2007, at 4:24 AM, Burkamp, Christian wrote: curl http://localhost:8080/solr/update --data-binary @ I think the issue was with a bad file in /data/solr/conf. After a bunch of testing out of the installtion directory, I was able to use the post.sh script to post correctly into the server and had a successful commit. I'm now going to retry to customize the data set and see what I can screw up. Thanks for the help!
Help with Setup
Greetings I've gotten SOLR installed and the admin screens working. At this point I'm just trying to get my add record to be grabbed by the SOLR update process, but unfortunately, I'm getting a whitespace error that I could use some pointers on. I've searched the site and found similar errors but no tips that could help me out. paladin:/data/solr mtorgler1$ curl http://localhost:8080/solr/update --data-binary articles.xml result status=1org.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(MXParser.java:1519) at org.xmlpull.mxp1.MXParser.nextImpl(MXParser.java:1395) at org.xmlpull.mxp1.MXParser.next(MXParser.java:1093) at org.xmlpull.mxp1.MXParser.nextTag(MXParser.java:1078) at org.apache.solr.core.SolrCore.update(SolrCore.java:661) at org.apache.solr.servlet.SolrUpdateServlet.doPost (SolrUpdateServlet.java:53) 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:613) --- My schema.xml is pretty straight forward, I didn't modify the types section, and modified the fields to the following fields field name=id type=string indexed=true stored=true/ field name=storyText type=text indexed=true stored=true/ /fields !-- field to use to determine and enforce document uniqueness. -- uniqueKeyid/uniqueKey !-- field for the QueryParser to use when an explicit fieldname is absent -- defaultSearchFieldstoryText/defaultSearchField !-- SolrQueryParser configuration: defaultOperator=AND|OR -- solrQueryParser defaultOperator=OR/ - My example document at this time is a singe doc (I've tried both with and without xml declaration) add doc field name=id2008/field field name=storyTextThe Rain in Spain Falls Mainly In The Plain/ field /doc /add What else am I missing? My Tomcat installation is 5.5.20 My SOLR info is Solr Specification Version: 1.1.0 Solr Implementation Version: 1.1.0-incubating - Yonik - 2006-12-17 17:09:54 Lucene Specification Version: nightly Lucene Implementation Version: build 2006-11-15 java.vm.version = 1.5.0_07-87 Any and all help is appreciated and will be rewarded with a warm glowing feeling of accomplishment! Thx!
Re: Help with Setup
paladin:/data/solr mtorgler1$ curl http://localhost:8080/solr/update --data-binary articles.xml result status=1org.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(MXParser.java:1519) at org.xmlpull.mxp1.MXParser.nextImpl(MXParser.java:1395) 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
Re: Help with Setup
Try: curl http://localhost:8080/solr/update --data-binary 'adddocfield name=id2008/fieldfield name=storyTextThe Rain in Spain Falls Mainly In The Plain/ field/doc/add' 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 [EMAIL PROTECTED] wrote: paladin:/data/solr mtorgler1$ curl http://localhost:8080/solr/update --data-binary articles.xml result status=1org.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(MXParser.java:1519) at org.xmlpull.mxp1.MXParser.nextImpl(MXParser.java:1395) 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