0
votes

I have problem using group feature of solr. I simply can't use the feature. Here is the description of the problem.

The group field that I use is defined as follows.

field name="clusterid" type="string" indexed="true" stored="true" multiValued="false"

The indexed "clusterid" field has valid values.

Initially, I tried using "group" feature using Solrj client API on the above field. I started getting "HTTP status 500 Internal Server Errors..." Assuming that the syntax or the ordering of the parameters could be an issue, I decided to test the same feature using firefox browser.

.../solr/select/?q=title%3Acomputer

yields a nice set of results with valid clusterid(s).

However, when I try to group the results using the clusterid field, I get a null pointer exception. Here is the url that was used for grouping

.../solr/select/?q=title%3Acomputer&group=true&group.field=clusterid

and the response was

type Status report

message null java.lang.NullPointerException at org.apache.solr.handler.clustering.ClusteringComponent.process(ClusteringComponent.java:89) at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:186) at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:129) at org.apache.solr.core.SolrCore.execute(SolrCore.java:1376) at org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:365) at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:260) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) at java.lang.Thread.run(Thread.java:662)

Note: I use the solr version 3.6.2 on Windows XP. The solrconfig file has changes only for the memory settings (increase value) from the default ones.

When I tried to use a multivalued field as group field, the response message was very clear that "multiValued" fields can not be used for grouping. When I tested with non-string fields, again I got responses that those were not string fields etc.

But when a field of string type (either clusterid or any other field that is of string type) was provided -- null pointer exception was thrown.

Do I miss anything that is obvious (in the schema or the solrconfig file)?

1
I tried in Solr 3.6 grouping on a string field that was missing from some documents in search results and it still did not throw NPE. It gives groupValue as null for those documents, so this is strange.arun
why is the ClusteringComponent being invoked ??? Are you firing clustering query ?Jayendra

1 Answers

0
votes

I'm facing the same issue using Solr 6.3. It appears the clustering component (which you are apparently using) is unable to extract the data it needs from a group response. The only workaround I found is to enable highlighting, then clustering appears to work; but this comes with a significant performance penalty. However if your result size is small it may be an option for you; for larger results (> 200-300 docs), clustering appears to be taking more time than highlighting anyway. I'm using the Lingo algorithm, maybe with STC it would be better.