[
https://issues.apache.org/jira/browse/SOLR-15482?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Cassandra Targett updated SOLR-15482:
-------------------------------------
Summary: Cross-collection join when document is missing 'from' field throws
NPE (was: Cross-collection join when document is missing from field throws NPE)
> 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
> Security Level: Public(Default Security Level. Issues are Public)
> Components: query parsers
> Reporter: Cassandra Targett
> Priority: Major
>
> 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: [email protected]
For additional commands, e-mail: [email protected]