[ https://issues.apache.org/jira/browse/SOLR-10564?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16000981#comment-16000981 ]
Amrit Sarkar edited comment on SOLR-10564 at 5/8/17 4:02 PM: ------------------------------------------------------------- I closely look into the issue and understood what is going wrong there: First there must and must be more than 1 shard to get into QueryComponent::mergeIds(...) function:: The default response of '/select' request handlers constitute 'response' and 'sort_values' objects (screenshot-1) and the default response of '/query' request handlers constitute 'response' and 'sort_values' objects (screenshot-2) and the default response of '/get' request handlers constitute 'response' object only (screenshot-3) If we jump to QueryComponent.java::1074 (screenshot-4) {code} NamedList unmarshalledSortFieldValues = unmarshalSortValues(ss, sortFieldValues, schema); {code} QueryComponent.java::unmarshalSortValues::1223 (screenshot-5) {code} if (0 == sortFieldValues.size()) return unmarshalledSortValsPerField; {code} There is no check over whether the sortFieldValues is null or not and assumed it will be created, even empty object. I have uploaded a patch which will fix this. I still need to write test cases for this. was (Author: sarkaramr...@gmail.com): I closely look into the issue and understood what is going wrong there: The default response of '/select' request handlers constitute 'response' and 'sort_values' objects (screenshot-1) and the default response of '/query' request handlers constitute 'response' and 'sort_values' objects (screenshot-2) and the default response of '/get' request handlers constitute 'response' object only (screenshot-3) If we jump to QueryComponent.java::1074 (screenshot-4) {code} NamedList unmarshalledSortFieldValues = unmarshalSortValues(ss, sortFieldValues, schema); {code} QueryComponent.java::unmarshalSortValues::1223 (screenshot-5) {code} if (0 == sortFieldValues.size()) return unmarshalledSortValsPerField; {code} There is no check over whether the sortFieldValues is null or not and assumed it will be created, even empty object. I have uploaded a patch which will fix this. I still need to write test cases for this. > NPE in QueryComponent when RTG > ------------------------------ > > Key: SOLR-10564 > URL: https://issues.apache.org/jira/browse/SOLR-10564 > Project: Solr > Issue Type: Bug > Security Level: Public(Default Security Level. Issues are Public) > Affects Versions: 6.5 > Reporter: Markus Jelsma > Fix For: master (7.0) > > Attachments: screenshot-1.png, screenshot-2.png, screenshot-3.png, > screenshot-4.png, screenshot-5.png, SOLR-10564.patch > > > The following URL: > {code} > /get?fl=queries,prob_*,view_score,feedback_score&ids=<SOME_ID> > {code} > Kindly returns the document. > This once, however: > {code} > /select?qt=/get&fl=queries,prob_*,view_score,feedback_score&ids=<SOME_ID> > {code} > throws: > {code} > 2017-04-25 10:23:26.222 ERROR (qtp1873653341-28693) [c:documents s:shard1 > r:core_node3 x:documents_shard1_replica1] o.a.s.s.HttpSolrCall > null:java.lang.NullPointerException > at > org.apache.solr.handler.component.QueryComponent.unmarshalSortValues(QueryComponent.java:1226) > at > org.apache.solr.handler.component.QueryComponent.mergeIds(QueryComponent.java:1077) > at > org.apache.solr.handler.component.QueryComponent.handleRegularResponses(QueryComponent.java:777) > at > org.apache.solr.handler.component.QueryComponent.handleResponses(QueryComponent.java:756) > at > org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:428) > at > org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:173) > at org.apache.solr.core.SolrCore.execute(SolrCore.java:2440) > at org.apache.solr.servlet.HttpSolrCall.execute(HttpSolrCall.java:723) > at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:529) > at > org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:347) > at > org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:298) > {code} > This is thrown when i do it manually, but the error does not appear when Solr > issues those same queries under the hood. -- This message was sent by Atlassian JIRA (v6.3.15#6346) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org