(btw, I'm running 1.4.1) It looks like my assumption was wrong. Regardless of the fields selected using the "fl" parameter and the enableLazyFieldLoading setting, solr apparently fetches from disk and caches all the fields in the document (or maybe just those that are stored="true" in my schema.) My evidence for this is the documentCache stats reported by solr/admin. If I request "rows=10&fl=id" followed by "rows=10&fl=id,title" I would expect to see the 2nd request result in a 2nd insert to the cache, but instead I see that the 2nd request hits the cache from the 1st request. "rows=10&fl=*" does the same thing. i.e., the first request, even though I have enableLazyFieldLoading=true and I'm only asking for the ids, fetches the entire document from disk and inserts into the documentCache. Subsequent requests, regardless of which fields I actually select, don't hit the disk but are loaded from the documentCache. Is this really the expected behavior and/or am I misunderstanding something?
A 2nd question: while watching these stats I noticed something else weird with the queryResultCache. It seems that inserts to the queryResultCache depend on the number of rows requested. For example, an initial request (solr restarted, clean cache, etc) with rows=10 will result in a insert. A 2nd request of the same query with rows=1000 will result in a cache hit. However if you reverse that order, starting with a clean cache, an initial request for rows=1000 will *not* result in an insert to queryResultCache. I have tried various increments--10, 100, 200, 500--and it seems the magic number is somewhere between 200 (cache insert) and 500 (no insert). Can someone explain this? Thanks, --jay On Wed, Oct 27, 2010 at 10:54 AM, Markus Jelsma <markus.jel...@openindex.io> wrote: > I've been wondering about this too some time ago. I've found more > informationenableLazyFieldLoading > in SOLR-52 and some correspondence on this one but it didn't give me a > definitive answer.. > > [1]: https://issues.apache.org/jira/browse/SOLR-52 > [2]: http://www.mail-archive.com/solr-...@lucene.apache.org/msg01185.html > > On Wednesday 27 October 2010 16:39:44 Jay Luker wrote: >> Hi all, >> >> The solr wiki says this about the documentCache: "The more fields you >> store in your documents, the higher the memory usage of this cache >> will be." >> >> OK, but if i have enableLazyFieldLoading set to true and in my request >> parameters specify "fl=id", then the number of fields per document >> shouldn't affect the memory usage of the document cache, right? >> >> Thanks, >> --jay > > -- > Markus Jelsma - CTO - Openindex > http://www.linkedin.com/in/markus17 > 050-8536600 / 06-50258350 >