Hello all,
I'm experimenting with the "Distributed Search" bits in the nightly
builds and I'm facing a problem.
I have on my schema.xml some dynamic fields defined like this:
<dynamicField name="$*" type="double" indexed="true" stored="true" />
<dynamicField name="@*" type="string" indexed="true" stored="true"
multiValued="true" />
<dynamicField name="*" type="string" indexed="true" stored="true" />
When hitting a single shard the following query works fine:
http://<solr>/select?q=*:*&fl=ts,$distinct_boxes
But when I add the "&distrib=true" parameter I get a NullPointerException:
java.lang.NullPointerException
at
org.apache.solr.handler.component.QueryComponent.returnFields(QueryComponent.java:1025)
at
org.apache.solr.handler.component.QueryComponent.handleRegularResponses(QueryComponent.java:725)
at
org.apache.solr.handler.component.QueryComponent.handleResponses(QueryComponent.java:700)
at
org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:292)
at
org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:129)
at org.apache.solr.core.SolrCore.execute(SolrCore.java:1451)
at
org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:353)
at
org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:248)
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.headerComplete(HttpConnection.java:928)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:549)
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)
The "$" in "$distinct_boxes" appears to be the culprit somehow, the query:
<http://<solr>/select?q=*:*&fl=ts,distinct_boxes&distrib=true>
works without errors, but of course doesn't retrieve the field I want.
Funnily enough when requesting the uniqueKey field there are no errors:
<http://<solr>/select?q=*:*&fl=tid,ts,$distinct_boxes&distrib=true>
But somehow the data from the field "$distinct_boxes" doesn't appear in
the output.
Is there some workaround? Using "fl=*" returns all the data from the
fields that start with "$" but it severely increases the size of the
response.
--
Luis Neves