lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SOLR-12107) [child] doc transformer used w/o uniqueKey in 'fl' fails with NPE unless documentCache is enabled
Date Mon, 19 Mar 2018 21:32:00 GMT

    [ https://issues.apache.org/jira/browse/SOLR-12107?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16405487#comment-16405487
] 

ASF subversion and git services commented on SOLR-12107:
--------------------------------------------------------

Commit 11af2144b66717f41e2fcb5c73c7059cf009a00a in lucene-solr's branch refs/heads/branch_7x
from Chris Hostetter
[ https://git-wip-us.apache.org/repos/asf?p=lucene-solr.git;h=11af214 ]

SOLR-11891: DocStreamer now respects the ReturnFields when populating a SolrDocument
This is an optimization that reduces the number of unneccessary fields a ResponseWriter will
see if documentCache is used

This commit also includes fixes for SOLR-12107 & SOLR-12108 -- two bugs that were previously
dependent on the
un-optimized behavior of DocStreamer in order to function properly.

- SOLR-12107: Fixed a error in [child] transformer that could ocur if documentCache was not
used
- SOLR-12108: Fixed the fallback behavior of [raw] and [xml] transformers when an incompatble
'wt' was specified,
  the field value was lost if documentCache was not used.

(cherry picked from commit 8bd7e5c9d254c1d629a784e0b601885adea2f57b)


> [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
>
> 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


Mime
View raw message