Hi fellows,

I know zeta-dev is mostly in holidays, I will wait your come back to get
some feedback.
I've got stucked for 2 or 3 days on a commit issue using Apache SolR 3.1
with the Search component.
I put the whole story, so if someone is encountering the same, it could be
usable.

Here was the issue :

In the PHP, I was using the following code :

$this->session = new ezcSearchSession(
                    new ezcSearchSolrHandler($domain, $port ,
$uri."/".$location),
                    new ezcSearchEmbeddedManager()
                );
$this->session->index($object);

Everything was going well until I tried to set the beginTransaction / commit
mechanism.

The following error was appearing in the solr logs :

2011-08-07 15:10:10.710:WARN::/solr/.../update/
java.lang.IllegalStateException: Committed
at org.mortbay.jetty.Response.resetBuffer(Response.java:1023)
at org.mortbay.jetty.Response.sendError(Response.java:240)
at
org.apache.solr.servlet.SolrDispatchFilter.sendError(SolrDispatchFilter.java:380)
at
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:283)
at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1212)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:399)
at
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:766)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:450)
at
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
at
org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:326)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
at
org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:945)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:756)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at
org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:228)
at
org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)

I've tried different things to identify where the issue was coming from and
finally tried to see if it was my SolR.
I've used the SolR client from this website http://www.solrclient.com/ that
was very useful to send XML data quickly to test the instance.
Everything has gone right with the good sequence of XML (add then commit).

Digging more in the AZC Search API, I've quickly reached the index function
of solr.php.
At the end of this one, if the beginTransaction function was called before,
the runCommit is run.
Index is the only function to use the runCommit function.

My question is : why put the commit logic at the end of this function ( it
has not been done in the delete functions ) ?
Is that an issue for you ? Let me know.

-- 
Maxime
maxime.tho...@wascou.org | www.wascou.org | http://twitter.com/wascou

Reply via email to