[ https://issues.apache.org/jira/browse/SOLR-15482?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17389994#comment-17389994 ]
Chris M. Hostetter commented on SOLR-15482: ------------------------------------------- Sorry folks, Not sure how i screwed that up. > Cross-collection join when document is missing 'from' field throws NPE > ---------------------------------------------------------------------- > > Key: SOLR-15482 > URL: https://issues.apache.org/jira/browse/SOLR-15482 > Project: Solr > Issue Type: Bug > Components: query parsers > Reporter: Cassandra Targett > Assignee: Chris M. Hostetter > Priority: Major > Fix For: main (9.0), 8.10 > > Attachments: SOLR-15482.patch > > > When using {{method=crossCollection}} in a Join query, if a document does not > have the field used for the {{from}} param, a NullPointerException is thrown. > This is pretty simple to reproduce using the techproducts sample data > (following assumes a clean install): > {code} > $ ./bin/solr start -e cloud -noprompt > $ ./bin/post -c gettingstarted example/exampledocs/*.xml > $ curl 'http://localhost:8983/solr/gettingstarted/select' -F 'q={!join > method="crossCollection" from=manu_id_s to=manu_id_s > fromIndex=gettingstarted}*:*' > { > "responseHeader":{ > "zkConnected":true, > "status":500, > "QTime":335, > "params":{ > "q":"{!join method=\"crossCollection\" from=manu_id_s to=manu_id_s > fromIndex=gettingstarted}*:*"}}, > "error":{ > "metadata":[ > > "error-class","org.apache.solr.client.solrj.impl.BaseHttpSolrClient$RemoteSolrException", > > "root-error-class","org.apache.solr.client.solrj.impl.BaseHttpSolrClient$RemoteSolrException"], > "msg":"Error from server at null: java.lang.NullPointerException\n\tat > org.apache.solr.schema.FieldType.readableToIndexed(FieldType.java:419)... > {code} > Depending on which shard the error comes from, you might see a "No live > SolrServers available to handle this request" error, but digging into the > logs for the other shard that served the query will show the same NPE in the > example above (I'll put a full stack trace into a comment). > "Regular" (non-cross-collection) joins work fine if some documents are > missing the field. > If we shouldn't expect XCJF to work when documents are missing the {{from}} > field, then we should document that as a limitation and also throw a more > descriptive error. -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org