lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Markus Jelsma (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SOLR-9917) NPE in JSON facet merger
Date Tue, 03 Jan 2017 21:45:58 GMT

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

Markus Jelsma commented on SOLR-9917:
-------------------------------------

I only have access to the code right now, here's the SolrJ code causing it:

vars:
logHistory is just the number of days we look back in the history;
percentile is, well, the percentile, it is set to 90th percentile

{code}
    SolrQuery query = new SolrQuery("{!term f=document}" + document);
    query.setRows(0);
    query.addFilterQuery("{!term f=type}view");
    query.addFilterQuery("time:[NOW-" + logHistory + "DAY/DAY TO NOW+1DAY/DAY]");

    query.setParam("json.facet", "{period:{type:range,field:time,start:\"NOW-" + logHistory
+ "DAY/DAY\",end:\"NOW+1DAY/DAY\",gap:\"+" + logHistory + "DAY\",facet:{time_percentiles:\"percentile(view_time,"
+ percentile + ")\"}}}");

    QueryResponse response = client.query(query);
{code}

Let me know if you need more information.


> NPE in JSON facet merger
> ------------------------
>
>                 Key: SOLR-9917
>                 URL: https://issues.apache.org/jira/browse/SOLR-9917
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>    Affects Versions: 6.3
>            Reporter: Markus Jelsma
>            Assignee: Yonik Seeley
>             Fix For: master (7.0), 6.4
>
>         Attachments: SOLR-9917.patch
>
>
> I've spotted this before, and just now one of my unit tests does it as well. I believe
this happens when there is no data for the requested field.
> {code}
> java.lang.NullPointerException
>         at java.nio.ByteBuffer.wrap(ByteBuffer.java:396)
>         at org.apache.solr.search.facet.PercentileAgg$Merger.merge(PercentileAgg.java:195)
>         at org.apache.solr.search.facet.FacetBucket.mergeBucket(FacetBucket.java:90)
>         at org.apache.solr.search.facet.FacetRequestSortedMerger.mergeBucketList(FacetRequestSortedMerger.java:61)
>         at org.apache.solr.search.facet.FacetRangeMerger.mergeBucketList(FacetRangeMerger.java:27)
>         at org.apache.solr.search.facet.FacetRangeMerger.merge(FacetRangeMerger.java:91)
>         at org.apache.solr.search.facet.FacetRangeMerger.merge(FacetRangeMerger.java:43)
>         at org.apache.solr.search.facet.FacetBucket.mergeBucket(FacetBucket.java:90)
>         at org.apache.solr.search.facet.FacetQueryMerger.merge(FacetModule.java:444)
>         at org.apache.solr.search.facet.FacetModule.handleResponses(FacetModule.java:272)
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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


Mime
View raw message