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 Chris Hostetter <ho...@fucit.org> on 2011/04/01 04:47:49 UTC

Re: Solrj Performance check.

: For eg, if I post a search url in browser, it shows the QTime in
: milliseconds only.
: 
: http://serverName/solr/mydata/select?q=computing&qt=myhandler&fq=category:1
: 
: But, if I query the same using Solrj from my project like below, it takes
: long time(8 - 12 sec) to produce the same results. Hence, I suspect whether
: Solrj takes such long time to produce results.

a) QTime is only the time spent processing the request, it doens't include 
the time spent writing the results back to hte client (which may be high 
if there are a lot of documents in the response, or very large documents 
i nthe response, or lots of network overhead, etc...)

b) how are you timing your SolrJ code? the snippet you presented doesn't 
give us any indication of what you are using to determine the 8-12 second 
timing number, so we have no way of knowing what exactly might be 
contributing to the total time.

: SolrServer server = new CommonsHttpSolrServer(url);
: SolrQuery query = new SolrQuery("computing");
: query.setParam("qt", "myhandler");
: query.setFilterQueries("category:1");
: query.setHighlight(false);
: QueryResponse rsp = server.query( query );

(for instance: if you put those lines in a small java program and time the 
entire program, that's going ot be a bad way to represent the timing, as 
it will also factor in all the time spent initializing hte JVM, loading 
classes etc...)


-Hoss