On 6/27/2014 2:07 AM, RadhaJayalakshmi wrote:
> Thanks for all of your responses - did some more research - and here is an
> observation:
> I am seeing an inconsistency in the QTime in the SolrQueryResponse object
> returned to the Client App Versus the value of the QTime printed in the
> Solr.log.
>
> Here is one specific instance:
>                 Value of QTime in SolrQueryResponse object is 5023 ms as
> seen by the Client App
>                 Value of QTime printed in Solr.log - 6ms
>
> Why is there such a huge inconsistency?

The actual "QTime" value is populated in the response by Solr, so it
should match perfectly.  The *elapsed* time, which is something else
that SolrJ will give you, will reflect the amount of time that the
request took from the client's point of view.

http://lucene.apache.org/solr/4_8_1/solr-solrj/org/apache/solr/client/solrj/response/SolrResponseBase.html#getElapsedTime%28%29
http://lucene.apache.org/solr/4_8_1/solr-solrj/org/apache/solr/client/solrj/response/SolrResponseBase.html#getQTime%28%29

If you are actually using getQTime() and seeing a mismatch, then I would
bet that you aren't looking at the same request in the Solr log.  If you
can include a junk parameter whose value is different for every request,
then you will see that parameter in the Solr logs, and you'll be able to
match the requests perfectly.  If you find another instance of a
mismatch happening, can you share the line from the solr log and the
SolrJ code that you used to get the QTime?

Thanks,
Shawn

Reply via email to