lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shalin Shekhar Mangar <shalinman...@gmail.com>
Subject Re: Exception in SolrResponseBase.getQTime
Date Wed, 16 Sep 2015 07:14:14 GMT
Okay, I found the problem, see https://issues.apache.org/jira/browse/SOLR-6547

I have committed a fix which should be released with Solr 5.4. In the
mean while, if you need access to the qtime for such responses,
instead of using response.getQTime() do the following:

int qtime = -1;
NamedList header = response.getResponseHeader();
if (header != null) {
    qtime =  ((Number) header.get("QTime")).intValue();
}

On Wed, Sep 16, 2015 at 12:09 PM, Shalin Shekhar Mangar
<shalinmangar@gmail.com> wrote:
> Hi Gauri,
>
> Can you give more details on when this happens? Which Solr version?
> Also, can you please post the full stack trace?
>
> On Tue, Sep 15, 2015 at 9:19 PM, Gauri Shankar <gshankar.sahu@gmail.com> wrote:
>> Hi,
>>
>> I need a bit of your help as we recently encountering an issue related to
>> "QTime" in solr response via solrj client.
>>
>> java.lang.ClassCastException: java.lang.Long cannot be cast to
>> java.lang.Integer
>>  at
>> org.apache.solr.client.solrj.response.SolrResponseBase.getQTime(SolrResponseBase.java:76)
>>  at
>> .....
>> .....
>>
>> I was exploring the source in -- org.apache.solr.core.SolrCore and there I
>> see that QTime is added as int only.
>>
>> Other interesting observation is -- this is happening in one collection and
>> not happening in another collection while adding document to index.
>> Document are being added to both collection in similar way and they do have
>> the similar solrconfig...exactly same.
>>
>> Could you please help me out on this?
>>
>> --
>> Regards,
>> Gauri Shankar
>
>
>
> --
> Regards,
> Shalin Shekhar Mangar.



-- 
Regards,
Shalin Shekhar Mangar.

Mime
View raw message