lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Munendra S N (JIRA)" <>
Subject [jira] [Commented] (SOLR-13318) JsonFacetingResponse classes should record provide access to count fields as longs
Date Mon, 06 May 2019 06:12:00 GMT


Munendra S N commented on SOLR-13318:

Thanks for merging this

In branch_8x and branch_8_1, new methods are introduced and old methods are deprecated. In
the master, old methods are changed to return long instead of int and new methods are not
So, any one using new methods after 8.1 release, again have to make changes to use different
methods in 9.0. Would this okay from user perspective?

> JsonFacetingResponse classes should record  provide access to count fields as longs
> -----------------------------------------------------------------------------------
>                 Key: SOLR-13318
>                 URL:
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: SolrJ
>    Affects Versions: 7.7.1
>            Reporter: Jason Gerlowski
>            Assignee: Jason Gerlowski
>            Priority: Minor
>         Attachments: SOLR-13318-branch_8x.patch, SOLR-13318.patch, SOLR-13318.patch
> JsonFacetingResponse and its series of dependent classes hold a variety of count fields
for bucket counts and various optional properties ({{allBuckets}}, {{numBuckets}}, etc.).
 Currently, some of the code that parses these values out of the originating NamedList either
stores or casts the values as ints.  When doc counts are low this works fine.  But when the
doc counts become larger and stray into "long" territory, SolrJ is liable to blow up with
> A user on the list reported on of these with the partial stack trace:
> {code}
> Caused by: java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.Integer
>       at org.apache.solr.client.solrj.response.json.NestableJsonFacet.<init>(
>       at org.apache.solr.client.solrj.response.QueryResponse.extractJsonFacetingInfo(
>       at org.apache.solr.client.solrj.response.QueryResponse.getJsonFacetingResponse(
> {code}
> We should fix this so that these classes can be used without incident for any doc counts.

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message