Short summary:

 *  Using both highlighting and shards and q.alt is giving me a null
    pointer exception.

 *  Really easy to workaround; but since the similar cases without
    shards work, perhaps this should too.

 *  If you think it should be fixed, point me in the right direction
    and I can code up a patch.

With a few days ago Solr trunk, I'm seeing a NullPointerException [full
backtrace below] in HighlightComponent when I use shards & the
highlighter & q.alt.

I think this more minimal example shows the exception.    Using the
example install from "ant example" with the example data loaded, this
request:

http://localhost:8983/solr/select?q.alt=*:*&hl=on&defType=edismax&shards=localhost:8983/solr

is giving me a null pointer exception in
HighlightComponent.finishStage(HighlightComponent.java:158)
If I don't try to specify shards like this:

http://localhost:8983/solr/select?q.alt=*:*&hl=on&defType=edismax

it works fine.    Also, if I still use shards, but add a harmless
q parameter like this:

http://localhost:8983/solr/select?q.alt=*:*&hl=on&defType=edismax&shards=localhost:8983/solr&q=*:*

it works fine too.

   Ron


[1]
java.lang.NullPointerException
        at 
org.apache.solr.handler.component.HighlightComponent.finishStage(HighlightComponent.java:158)
        at 
org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:307)
        at 
org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:131)
        at org.apache.solr.core.SolrCore.execute(SolrCore.java:1323)
        at 
org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:337)
        at 
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:240)
        at 
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
        at 
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
        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:765)
        at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
        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.headerComplete(HttpConnection.java:923)
        at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:547)
        at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
        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)

Reply via email to