Hey Adi, There was a separate JIRA for this on the SolrJ objects it sounds like you're using: SOLR-13780. That JIRA was fixed, apparently in 8.3, so I'm surprised you're still seeing the issue. If you include the full stacktrace and a snippet of code to reproduce, I'm curious to take a look.
That won't help you in the short term though. For that, yes, you'll have to use ((Number)count).longValue() in the interim. Best, Jason On Tue, Jan 28, 2020 at 2:20 AM Kaminski, Adi <adi.kamin...@verint.com> wrote: > > Thanks Mikhail ! > > In issue comments that you have shared it seems that Yonik S doesn't agree > it's a defect...so probably will remain opened for a while. > > > > So meanwhile, is it recommended to perform casting > ((Number)count).longValue() to our relevant logic ? > > > > Thanks, > Adi > > > > -----Original Message----- > From: Mikhail Khludnev <m...@apache.org> > Sent: Tuesday, January 28, 2020 9:14 AM > To: solr-user <solr-user@lucene.apache.org> > Subject: Re: Solr fact response strange behaviour > > > > https://issues.apache.org/jira/browse/SOLR-11775 > > > > On Tue, Jan 28, 2020 at 10:00 AM Kaminski, Adi > <adi.kamin...@verint.com<mailto:adi.kamin...@verint.com>> > > wrote: > > > > > Is it existing issue and tracked for future fix consideration ? > > > > > > What's the suggestion as W/A until fix - to case every related > > > response with ((Number)count).longValue() ? > > > > > > -----Original Message----- > > > From: Mikhail Khludnev <m...@apache.org<mailto:m...@apache.org>> > > > Sent: Tuesday, January 28, 2020 8:53 AM > > > To: solr-user > > <solr-user@lucene.apache.org<mailto:solr-user@lucene.apache.org>> > > > Subject: Re: Solr fact response strange behaviour > > > > > > I suppose there's an issue, which no one ever took a look. > > > > > > https://lucene.472066.n3.nabble.com/JSON-facets-count-a-long-or-an-int > > > eger-in-cloud-and-non-cloud-modes-td4265291.html > > > > > > > > > On Mon, Jan 27, 2020 at 11:47 PM Kaminski, Adi > > > <adi.kamin...@verint.com<mailto:adi.kamin...@verint.com>> > > > wrote: > > > > > > > SolrJ client is used of SolrCloud of Solr 8.3 version for JSON > > > > Facets requests...any idea why not consistent ? > > > > > > > > Sent from Workspace ONE Boxer > > > > > > > > On Jan 27, 2020 22:13, Mikhail Khludnev > > > <m...@apache.org<mailto:m...@apache.org>> wrote: > > > > Hello, > > > > It might be different between SolrCloud and standalone mode. No data > > > > enough to make a conclusion. > > > > > > > > On Mon, Jan 27, 2020 at 5:40 PM Rudenko, Artur > > > > <artur.rude...@verint.com<mailto:artur.rude...@verint.com>> > > > > wrote: > > > > > > > > > I'm trying to parse facet response, but sometimes the count > > > > > returns as Long type and sometimes as Integer type(on different > > > > > environments), The error is: > > > > > "java.lang.ClassCastException: java.lang.Integer cannot be cast to > > > > > java.lang.Long" > > > > > > > > > > Can you please explain why this happenes? Why it not consistent? > > > > > > > > > > I know the workaround to use Number class and longValue method but > > > > > I want to to the root cause before using this workaround > > > > > > > > > > Artur Rudenko > > > > > > > > > > > > > > > > > > > > This electronic message may contain proprietary and confidential > > > > > information of Verint Systems Inc., its affiliates and/or subsidiaries. > > > > The > > > > > information is intended to be for the use of the individual(s) or > > > > > entity(ies) named above. If you are not the intended recipient (or > > > > > authorized to receive this e-mail for the intended recipient), you > > > > > may > > > > not > > > > > use, copy, disclose or distribute to anyone this message or any > > > > information > > > > > contained in this message. If you have received this electronic > > > > > message > > > > in > > > > > error, please notify us by replying to this e-mail. > > > > > > > > > > > > > > > > > -- > > > > Sincerely yours > > > > Mikhail Khludnev > > > > > > > > > > > > This electronic message may contain proprietary and confidential > > > > information of Verint Systems Inc., its affiliates and/or > > > > subsidiaries. The information is intended to be for the use of the > > > > individual(s) or > > > > entity(ies) named above. If you are not the intended recipient (or > > > > authorized to receive this e-mail for the intended recipient), you > > > > may not use, copy, disclose or distribute to anyone this message or > > > > any information contained in this message. If you have received this > > > > electronic message in error, please notify us by replying to this e-mail. > > > > > > > > > > > > > -- > > > Sincerely yours > > > Mikhail Khludnev > > > > > > > > > This electronic message may contain proprietary and confidential > > > information of Verint Systems Inc., its affiliates and/or > > > subsidiaries. The information is intended to be for the use of the > > > individual(s) or > > > entity(ies) named above. If you are not the intended recipient (or > > > authorized to receive this e-mail for the intended recipient), you may > > > not use, copy, disclose or distribute to anyone this message or any > > > information contained in this message. If you have received this > > > electronic message in error, please notify us by replying to this e-mail. > > > > > > > > > -- > > Sincerely yours > > Mikhail Khludnev > > > This electronic message may contain proprietary and confidential information > of Verint Systems Inc., its affiliates and/or subsidiaries. The information > is intended to be for the use of the individual(s) or entity(ies) named > above. If you are not the intended recipient (or authorized to receive this > e-mail for the intended recipient), you may not use, copy, disclose or > distribute to anyone this message or any information contained in this > message. If you have received this electronic message in error, please notify > us by replying to this e-mail.