You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Prasi S <pr...@gmail.com> on 2013/11/28 10:40:13 UTC

Solrj Query Performance

Hi,
We recently saw a behavior which I wanted to confirm, WE are using solrj to
query solr. From the code, we use HttpSolrServer to hit the query and
return the response

1. When a sample query is hit using Solrj, we get the QTime as 4seconds.
The same query when we hit against solr in the browser, we get it in
50milliseconds.

Initially we thought it was because of caching.

But then, we tried the reverse way. We hit a new query to solr in the
browser first. We got in milliseconds. Then we used Solrj, it came to 4.5
seconds. ( We take the QTime from the response object Header.

Is this anything to do with Solrj's internal implementation?

Thanks,
Prasi

Re: Solrj Query Performance

Posted by Shawn Heisey <so...@elyograg.org>.
On 11/28/2013 3:01 AM, Ahmet Arslan wrote:
> Are you sure you are using the same exact parameters? I would include enhoParams=all and compare parameters. Only wt parameter would be different. wt=javabin for solrJ 

You can also look at the Solr log, which if you are logging at the
normal level of INFO, will contain all parameters used on each query,
and compare the two.  There is probably some critical difference.

Thanks,
Shawn


Re: Solrj Query Performance

Posted by Ahmet Arslan <io...@yahoo.com>.
Hi Parsi,

Are you sure you are using the same exact parameters? I would include enhoParams=all and compare parameters. Only wt parameter would be different. wt=javabin for solrJ 



On Thursday, November 28, 2013 11:42 AM, Prasi S <pr...@gmail.com> wrote:

Hi,
We recently saw a behavior which I wanted to confirm, WE are using solrj to
query solr. From the code, we use HttpSolrServer to hit the query and
return the response

1. When a sample query is hit using Solrj, we get the QTime as 4seconds.
The same query when we hit against solr in the browser, we get it in
50milliseconds.

Initially we thought it was because of caching.

But then, we tried the reverse way. We hit a new query to solr in the
browser first. We got in milliseconds. Then we used Solrj, it came to 4.5
seconds. ( We take the QTime from the response object Header.

Is this anything to do with Solrj's internal implementation?

Thanks,
Prasi