: I am using Solr1.4 for searching through half a million documents. The
: problem is, I want to retrieve nearly 200 documents for each search query.
: The query time in Solr logs is showing 0.02 seconds and I am fairly happy
: with that. However Solr is taking a long time (4 to 5 secs) to return the
: results (I think it is because of the number of docs I am requesting). I
: tried returning only the id's (unique key) without any other stored fields,
: but it is not helping me improve the response times (time to return the id's
: of matching documents).

What exactly does your request URL look like, and how exactly are you 
timing the total response time?

200 isn't a very big number for the rows param -- people who want to get 
100K documents back in their response at a time may have problems, but 200 
is not that big.

so like i said: how exactly are you timing things?

My guess: it's more likely that network overhead or the performance of 
your client code (reading the data off the wire) is causing your timing 
code to seem slow, then it is that Solr is taking 5 seconds to write out 
those document IDs.

I suspect if you try hitting the same exact URL using curl via localhost, 
you'll see the total response time be a lot less then 5 seconds.

Here's an example of a query that asks solr to return *every* field from 
500 documents, in the XML format.  And these are not small documents...

$ /usr/bin/time -p curl -sS -o /tmp/solr.out 
"http://localhost:5051/solr/select/?q=doctype:product&version=2.2&start=0&rows=500&indent=on";
real 0.07
user 0.00
sys 0.00
[chr...@c18-ssa-so-dfll-qry1 ~]$ du -sh /tmp/solr.out 
1.6M    /tmp/solr.out

...that's 1.6 MB of 500 Solr documents with all of their fields in 
verbose XML format (including indenting) fetched in 70ms.

If it's taking 5 seconds for you to get just the ids of 200 docs, you've 
got a problem somewhere and i'm 99% certain it's not in Solr.

what does a similar "time curl" command for your URL look like when you 
run it on your solr server?


-Hoss

Reply via email to