Return-Path: X-Original-To: apmail-lucene-solr-user-archive@minotaur.apache.org Delivered-To: apmail-lucene-solr-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 3FA3818B7A for ; Thu, 7 Jan 2016 06:05:36 +0000 (UTC) Received: (qmail 24787 invoked by uid 500); 7 Jan 2016 06:05:29 -0000 Delivered-To: apmail-lucene-solr-user-archive@lucene.apache.org Received: (qmail 24714 invoked by uid 500); 7 Jan 2016 06:05:29 -0000 Mailing-List: contact solr-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: solr-user@lucene.apache.org Delivered-To: mailing list solr-user@lucene.apache.org Received: (qmail 24698 invoked by uid 99); 7 Jan 2016 06:05:29 -0000 Received: from Unknown (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Jan 2016 06:05:29 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 2D301C162C for ; Thu, 7 Jan 2016 06:05:29 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.556 X-Spam-Level: X-Spam-Status: No, score=-0.556 tagged_above=-999 required=6.31 tests=[RCVD_IN_MSPIKE_H2=-0.001, RP_MATCHES_RCVD=-0.554, SPF_PASS=-0.001] autolearn=disabled Received: from mx1-us-east.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id wAosmUpNNx9D for ; Thu, 7 Jan 2016 06:05:20 +0000 (UTC) Received: from aserp1040.oracle.com (aserp1040.oracle.com [141.146.126.69]) by mx1-us-east.apache.org (ASF Mail Server at mx1-us-east.apache.org) with ESMTPS id 11E76439D5 for ; Thu, 7 Jan 2016 06:05:20 +0000 (UTC) Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id u0765IO5007490 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Thu, 7 Jan 2016 06:05:19 GMT Received: from aserv0122.oracle.com (aserv0122.oracle.com [141.146.126.236]) by userv0021.oracle.com (8.13.8/8.13.8) with ESMTP id u0765Ilr019986 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Thu, 7 Jan 2016 06:05:18 GMT Received: from abhmp0018.oracle.com (abhmp0018.oracle.com [141.146.116.24]) by aserv0122.oracle.com (8.13.8/8.13.8) with ESMTP id u0765Icm002564 for ; Thu, 7 Jan 2016 06:05:18 GMT Received: from [10.191.4.202] (/10.191.4.202) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 06 Jan 2016 22:05:18 -0800 Message-ID: <568E0050.9050303@oracle.com> Date: Thu, 07 Jan 2016 14:06:08 +0800 From: hao jin Organization: Oracle Corporation User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.1.2 MIME-Version: 1.0 To: solr-user@lucene.apache.org Subject: PercentileAgg.merge could throw NPE when percentile function is used in a subFacet with a shards param Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Source-IP: userv0021.oracle.com [156.151.31.71] Hi, When I call such query, an NPE is reported q=*:*&json.facet={root:{type:range,%20field:time,%20start:"2014-07-11T10:22:29.000Z",%20end:"2014-12-31T12:30:00.000Z",%20gap:"%2B1MONTH/MONTH",%20hardend:true,%20limit:-1,%20facet:{sub:{type:terms,%20field:astrField,%20missing:true,%20limit:-1,%20facet:{"pct(adoubleField)":"percentile(adoubleField,%2050.0)"}}}}}&shards=http://localhost:8983/solr/qa_env "java.lang.NullPointerException\r\n\tat java.nio.ByteBuffer.wrap(ByteBuffer.java:392)\r\n\tat org.apache.solr.search.facet.PercentileAgg$Merger.merge(PercentileAgg.java:196)\r\n\tat org.apache.solr.search.facet.FacetBucket.mergeBucket(FacetModule.java:410)\r\n\tat In one or more buckets of the "astrField" field, there is no values for the "adoubleField". It seems like it happens when mergeing distributed results. If I exclude those buckets by adding filters in "q" or remove the "shards" param, NPE is not thrown and percentile work as expected. Is it a bug? Already known? Thanks, Henry