I am a user of Solr 3.2 and I make use of the distributed search capabilities 
of Solr using a fairly simple architecture of a coordinator + some shards.

Correct me if I am wrong:  In a standard distributed search with 
QueryComponent, the first query sent to the shards asks for fl=myUniqueKey or 
fl=myUniqueKey,score.  When the response is being generated to send back to the 
coordinator, SolrIndexSearcher.doc (int i, Set<String> fields) is called for 
each document.  As I understand it, this will read each document from the index 
_on disk_ and retrieve the myUniqueKey field value for each document.

My idea is to have a FieldCache for the myUniqueKey field in SolrIndexSearcher 
(or somewhere else?) that would be used in cases where the only field that 
needs to be retrieved is myUniqueKey.  Is this something that would improve 
performance?

In our actual setup, we are using an extended version of QueryComponent that 
queries for a couple other fields besides myUniqueKey in the initial query to 
the shards, and it asks a lot of rows when doing so, many more than what the 
user ends up getting back when they see the results.  (The reasons for this are 
complicated and aren't related much to this question.)  We already maintain 
FieldCaches for the fields that we are asking for, but for other purposes.  
Would it make sense to utilize these FieldCaches in SolrIndexSearcher?  Is this 
something that anyone else has done before?

-Michael

Reply via email to