From dev-return-315576-archive-asf-public=cust-asf.ponee.io@lucene.apache.org Mon Mar 19 22:32:14 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id E33FC180647 for ; Mon, 19 Mar 2018 22:32:13 +0100 (CET) Received: (qmail 75844 invoked by uid 500); 19 Mar 2018 21:32:06 -0000 Mailing-List: contact dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list dev@lucene.apache.org Received: (qmail 75719 invoked by uid 99); 19 Mar 2018 21:32:06 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 19 Mar 2018 21:32:06 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 91AAC1804C8 for ; Mon, 19 Mar 2018 21:32:05 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -109.511 X-Spam-Level: X-Spam-Status: No, score=-109.511 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id ih6CdrROCvph for ; Mon, 19 Mar 2018 21:32:03 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 685B65F47B for ; Mon, 19 Mar 2018 21:32:02 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 397A2E0D7B for ; Mon, 19 Mar 2018 21:32:01 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 90079214C0 for ; Mon, 19 Mar 2018 21:32:00 +0000 (UTC) Date: Mon, 19 Mar 2018 21:32:00 +0000 (UTC) From: "ASF subversion and git services (JIRA)" To: dev@lucene.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (SOLR-12107) [child] doc transformer used w/o uniqueKey in 'fl' fails with NPE unless documentCache is enabled MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/SOLR-12107?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1640= 5487#comment-16405487 ]=20 ASF subversion and git services commented on SOLR-12107: -------------------------------------------------------- Commit 11af2144b66717f41e2fcb5c73c7059cf009a00a in lucene-solr's branch ref= s/heads/branch_7x from Chris Hostetter [ https://git-wip-us.apache.org/repos/asf?p=3Dlucene-solr.git;h=3D11af214 ] SOLR-11891: DocStreamer now respects the ReturnFields when populating a Sol= rDocument This is an optimization that reduces the number of unneccessary fields a Re= sponseWriter will see if documentCache is used This commit also includes fixes for SOLR-12107 & SOLR-12108 -- two bugs tha= t 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 docum= entCache was not used - SOLR-12108: Fixed the fallback behavior of [raw] and [xml] transformers w= hen 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)=20 > 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 i= t via {{getExtraRequestFields()}} > Because of the existing sloppy code in SOLR-11891, that means this bug in= ChildDocumentTransformer only impacts current users if the documentCache i= s disabled > ---- > Example steps to reproduce w/techproducts config assuming {{solrconfig.xm= l}} is edited to disable documentCache... > {noformat} > $ curl 'http://localhost:8983/solr/techproducts/update?commit=3Dtrue' -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=3Did: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=3Did:1&fl=3Did,%5= Bchild+parentFilter=3D"content_type:parentDocument"%5D' > { > "responseHeader":{ > "status":0, > "QTime":0, > "params":{ > "q":"id:1", > "fl":"id,[child parentFilter=3D\"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=3Did:1&fl=3D%5Bch= ild+parentFilter=3D"content_type:parentDocument"%5D' > { > "error":{ > "trace":"java.lang.NullPointerException\n\tat org.apache.solr.respons= e.transform.ChildDocTransformer.transform(ChildDocTransformerFactory.java:1= 33)\n\tat org.apache.solr.response.DocsStreamer.next(DocsStreamer.java:120)= \n\tat org.apache.solr.response.DocsStreamer.next(DocsStreamer.java:57)\n\t= at org.apache.solr.response.TextResponseWriter.writeDocuments(TextResponseW= riter.java:275)\n\tat org.apache.solr.response.TextResponseWriter.writeVal(= TextResponseWriter.java:161)\n\tat org.apache.solr.response.JSONWriter.writ= eNamedListAsMapWithDups(JSONResponseWriter.java:209)\n\tat org.apache.solr.= response.JSONWriter.writeNamedList(JSONResponseWriter.java:325)\n\tat org.a= pache.solr.response.JSONWriter.writeResponse(JSONResponseWriter.java:120)\n= \tat org.apache.solr.response.JSONResponseWriter.write(JSONResponseWriter.j= ava:71)\n\tat org.apache.solr.response.QueryResponseWriterUtil.writeQueryRe= sponse(QueryResponseWriterUtil.java:65)\n\tat org.apache.solr.servlet.HttpS= olrCall.writeResponse(HttpSolrCall.java:789)\n\tat org.apache.solr.servlet.= HttpSolrCall.call(HttpSolrCall.java:526)\n\tat org.apache.solr.servlet.Solr= DispatchFilter.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.ja= va:1629)\n\tat org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHan= dler.java:533)\n\tat org.eclipse.jetty.server.handler.ScopedHandler.handle(= ScopedHandler.java:143)\n\tat org.eclipse.jetty.security.SecurityHandler.ha= ndle(SecurityHandler.java:548)\n\tat org.eclipse.jetty.server.handler.Handl= erWrapper.handle(HandlerWrapper.java:132)\n\tat org.eclipse.jetty.server.ha= ndler.ScopedHandler.nextHandle(ScopedHandler.java:190)\n\tat org.eclipse.je= tty.server.session.SessionHandler.doHandle(SessionHandler.java:1595)\n\tat = org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.jav= a:188)\n\tat org.eclipse.jetty.server.handler.ContextHandler.doHandle(Conte= xtHandler.java:1253)\n\tat org.eclipse.jetty.server.handler.ScopedHandler.n= extScope(ScopedHandler.java:168)\n\tat org.eclipse.jetty.servlet.ServletHan= dler.doScope(ServletHandler.java:473)\n\tat org.eclipse.jetty.server.sessio= n.SessionHandler.doScope(SessionHandler.java:1564)\n\tat org.eclipse.jetty.= server.handler.ScopedHandler.nextScope(ScopedHandler.java:166)\n\tat org.ec= lipse.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.h= andle(ContextHandlerCollection.java:219)\n\tat org.eclipse.jetty.server.han= dler.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(HandlerW= rapper.java:132)\n\tat org.eclipse.jetty.server.Server.handle(Server.java:5= 30)\n\tat org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:347)= \n\tat org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.ja= va:256)\n\tat org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeede= d(AbstractConnection.java:279)\n\tat org.eclipse.jetty.io.FillInterest.fill= able(FillInterest.java:102)\n\tat org.eclipse.jetty.io.ChannelEndPoint$2.ru= n(ChannelEndPoint.java:124)\n\tat org.eclipse.jetty.util.thread.strategy.Ea= tWhatYouKill.doProduce(EatWhatYouKill.java:247)\n\tat org.eclipse.jetty.uti= l.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$ReservedThr= ead.run(ReservedThreadExecutor.java:382)\n\tat org.eclipse.jetty.util.threa= d.QueuedThreadPool.runJob(QueuedThreadPool.java:708)\n\tat org.eclipse.jett= y.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:626)\n\tat java.= lang.Thread.run(Thread.java:748)\n", > "code":500}} > {noformat} > =C2=A0 -- 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