Erik Hatcher schrieb: > > On Jan 24, 2007, at 9:38 AM, Maximilian Hütter wrote: >> Erik Hatcher schrieb: >>> >>> On Jan 22, 2007, at 4:09 AM, Maximilian Hütter wrote: >>>> Is there >>>> a XMLQueryParser yet? I didn't find it in the source. >>> >>> Yes - it's part Lucene's contrib area: >>> >>> >>> <http://svn.apache.org/repos/asf/lucene/java/trunk/contrib/xml-query-parser/> >>> >>> >>> >>> You'll have to build the JAR and put it into Solr's WAR, and construct a >>> new request handler to leverage it currently. >>> >>> Erik >>> >>> >> Thanks, I found and had a look at it. >> >> Is there any documentation on the xml syntax used with parser? > > The test cases are your best bet here: > > > <http://svn.apache.org/repos/asf/lucene/java/trunk/contrib/xml-query-parser/src/test/org/apache/lucene/xmlparser/> > > > The XMLQueryParser is fairly new and I haven't heard it mentioned much > in the Lucene community so it probably isn't get much use (yet). > >> The request handler should be possible, but I don't know how the request >> should look like... > > ?q=<xml>....</xml> perhaps? > >> The discussion from the mailing list is quite long and I am not sure >> what was implemented in the end. > > Again, Solr does not currently have support for this XMLQueryParser, so > it would be up to someone to build that support themselves (and > hopefully contribute it back). > > Erik > > I gave up on the xml parser as it obviously needs an older version of Lucene to work.
Posting a "normal" query-string would be fine, but that doesn't seem to work... I tried the solr-1.1.0 with Jetty (as in the tutorial) using curl. My request: curl -F q=solr http://localhost:8983/solr/select/ (after loading the xml examples) org.apache.solr.core.SolrException: Missing queryString at org.apache.solr.request.StandardRequestHandler.handleRequest(StandardRequestHandler.java:105) at org.apache.solr.core.SolrCore.execute(SolrCore.java:595) at org.apache.solr.servlet.SolrServlet.doGet(SolrServlet.java:92) at org.apache.solr.servlet.SolrServlet.doPost(SolrServlet.java:83) at javax.servlet.http.HttpServlet.service(HttpServlet.java:616) at javax.servlet.http.HttpServlet.service(HttpServlet.java:689) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:428) at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:473) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:568) at org.mortbay.http.HttpContext.handle(HttpContext.java:1530) at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:633) at org.mortbay.http.HttpContext.handle(HttpContext.java:1482) at org.mortbay.http.HttpServer.service(HttpServer.java:909) at org.mortbay.http.HttpConnection.service(HttpConnection.java:820) at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:986) at org.mortbay.http.HttpConnection.handle(HttpConnection.java:837) at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:245) at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357) at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534) So how do I get the query-string to solr using post. From looking at the sourcecode I would expect the request above to work... After all doPost just calls doGet.