Hi all,

I am using Solr 4.4 with multi cores. One core (called template) is my 
"routing" core.

When I run 
http://127.0.0.1:8983/solr/template/select?rows=5000&q=*:*&shards=127.0.0.1:8983/solr/core1,
 it consistently takes about 7s.
When I run http://127.0.0.1:8983/solr/core1/select?rows=5000&q=*:*, it 
consistently takes about 40ms.

I profiled the distributed query.
This is the distributed query process (I hope the terms are accurate):
When solr identifies a distributed query, it sends the query to the shard and 
get matched shard docs.
Then it sends another query to the shard to get the Solr documents.
Most time is spent in the last stage in the function "process" of 
"QueryComponent" in:

for (int i=0; i<idArr.size(); i++) {
        int id = req.getSearcher().getFirstMatch(
                new Term(idField.getName(), 
idField.getType().toInternal(idArr.get(i))));

How can I make my distributed query as fast as the direct one?

Thanks.

Reply via email to