You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Hoss Man (JIRA)" <ji...@apache.org> on 2018/03/19 21:33:00 UTC

[jira] [Resolved] (SOLR-12107) [child] doc transformer used w/o uniqueKey in 'fl' fails with NPE unless documentCache is enabled

     [ https://issues.apache.org/jira/browse/SOLR-12107?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hoss Man resolved SOLR-12107.
-----------------------------
       Resolution: Fixed
    Fix Version/s: master (8.0)
                   7.4

> [child] doc transformer used w/o uniqueKey in 'fl' fails with NPE unless documentCache is enabled
> -------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-12107
>                 URL: https://issues.apache.org/jira/browse/SOLR-12107
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>            Reporter: Hoss Man
>            Assignee: Hoss Man
>            Priority: Major
>             Fix For: 7.4, master (8.0)
>
>
> discovered this while working on SOLR-11891...
> The ChildDocumentTransformer implicitly assumes the uniqueKey field will allways be available when transforming the doc, w/o explicitly requesting it via {{getExtraRequestFields()}}
> Because of the existing sloppy code in SOLR-11891, that means this bug in ChildDocumentTransformer only impacts current users if the documentCache is disabled
> ----
> Example steps to reproduce w/techproducts config assuming {{solrconfig.xml}} is edited to disable documentCache...
> {noformat}
> $ curl 'http://localhost:8983/solr/techproducts/update?commit=true' -H 'Content-Type: application/json' --data-binary '[
> >   {
> >     "id": "1",
> >     "title": "Solr adds block join support",
> >     "content_type": "parentDocument",
> >     "_childDocuments_": [
> >       {
> >         "id": "2",
> >         "comments": "SolrCloud supports it too!"
> >       }
> >     ]
> >   },
> >   {
> >     "id": "3",
> >     "title": "New Lucene and Solr release is out",
> >     "content_type": "parentDocument",
> >     "_childDocuments_": [
> >       {
> >         "id": "4",
> >         "comments": "Lots of new features"
> >       }
> >     ]
> >   }
> > ]'
> {
>   "responseHeader":{
>     "status":0,
>     "QTime":69}}
> $ curl 'http://localhost:8983/solr/techproducts/query?q=id:1'
> {
>   "responseHeader":{
>     "status":0,
>     "QTime":5,
>     "params":{
>       "q":"id:1"}},
>   "response":{"numFound":1,"start":0,"docs":[
>       {
>         "id":"1",
>         "title":["Solr adds block join support"],
>         "content_type":["parentDocument"],
>         "_version_":1595047178033692672}]
>   }}
> $ curl 'http://localhost:8983/solr/techproducts/query?q=id:1&fl=id,%5Bchild+parentFilter="content_type:parentDocument"%5D'
> {
>   "responseHeader":{
>     "status":0,
>     "QTime":0,
>     "params":{
>       "q":"id:1",
>       "fl":"id,[child parentFilter=\"content_type:parentDocument\"]"}},
>   "response":{"numFound":1,"start":0,"docs":[
>       {
>         "id":"1",
>         "_childDocuments_":[
>         {
>           "id":"2",
>           "comments":"SolrCloud supports it too!",
>           "_version_":1595047178033692672}]}]
>   }}
> $ curl 'http://localhost:8983/solr/techproducts/query?q=id:1&fl=%5Bchild+parentFilter="content_type:parentDocument"%5D'
> {
>   "error":{
>     "trace":"java.lang.NullPointerException\n\tat org.apache.solr.response.transform.ChildDocTransformer.transform(ChildDocTransformerFactory.java:133)\n\tat org.apache.solr.response.DocsStreamer.next(DocsStreamer.java:120)\n\tat org.apache.solr.response.DocsStreamer.next(DocsStreamer.java:57)\n\tat org.apache.solr.response.TextResponseWriter.writeDocuments(TextResponseWriter.java:275)\n\tat org.apache.solr.response.TextResponseWriter.writeVal(TextResponseWriter.java:161)\n\tat org.apache.solr.response.JSONWriter.writeNamedListAsMapWithDups(JSONResponseWriter.java:209)\n\tat org.apache.solr.response.JSONWriter.writeNamedList(JSONResponseWriter.java:325)\n\tat org.apache.solr.response.JSONWriter.writeResponse(JSONResponseWriter.java:120)\n\tat org.apache.solr.response.JSONResponseWriter.write(JSONResponseWriter.java:71)\n\tat org.apache.solr.response.QueryResponseWriterUtil.writeQueryResponse(QueryResponseWriterUtil.java:65)\n\tat org.apache.solr.servlet.HttpSolrCall.writeResponse(HttpSolrCall.java:789)\n\tat org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:526)\n\tat org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:384)\n\tat org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:330)\n\tat org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1629)\n\tat org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:533)\n\tat org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)\n\tat org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)\n\tat org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)\n\tat org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190)\n\tat org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595)\n\tat org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188)\n\tat org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253)\n\tat org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168)\n\tat org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473)\n\tat org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564)\n\tat org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166)\n\tat org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155)\n\tat org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)\n\tat org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:219)\n\tat org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:126)\n\tat org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)\n\tat org.eclipse.jetty.rewrite.handler.RewriteHandler.handle(RewriteHandler.java:335)\n\tat org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)\n\tat org.eclipse.jetty.server.Server.handle(Server.java:530)\n\tat org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:347)\n\tat org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:256)\n\tat org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279)\n\tat org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:102)\n\tat org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124)\n\tat org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:247)\n\tat org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.produce(EatWhatYouKill.java:140)\n\tat org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131)\n\tat org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:382)\n\tat org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:708)\n\tat org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:626)\n\tat java.lang.Thread.run(Thread.java:748)\n",
>     "code":500}}
> {noformat}
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org