: ..fq=country:france
: 
: do these queries share cached items in the fieldcache? (in this example:
: country:france) or do they somehow live as seperate entities in the cache?
: The latter would explain my fieldcache having evictions at the moment.

FieldCache can't have evicitions.  it's a really low level "cache" where 
the key is field name and the value is an array containing a value for 
every document (you cna think of it as an inverted-inverted-index) that 
Lucene maintains directly.  items are never removed they just get garbage 
collected when the IndexReader is no longer used.  It's primarily for 
sorting, but the SimpleFacets code also leveragies it for facets in some 
cases -- Solr has no way of showing you what's in the FieldCache, because 
Lucene doesn't expose any inspection APIs to query it (it's a heisenberg 
cache .. once you ask if something is in it, it's in it)

are you refering to the "filterCache" ?  

filterCache contains records whose key is a "query" and whose value is a 
DocSet (an unordered collection of all docs matching a query) ... it's 
used whenever you use an "fq" param, for faceting on some fields (when the 
TermEnum method is used, a filterCache entry is added for each term 
tested), and even for some sorted queries if the 
<useFilterForSortedQuery/> config option is set to true.

the easiest way to know whether your faceting is using the FieldCache is 
to start your server cold (no newSearcher warming) and then send it a 
simple query with a single facet.field.  depending on the query, you might 
get 0 or 1 entries in the filterCache if SimpleFacets is using the 
FieldCache -- but if it's using the TermEnums, and generating a DocSet per 
term, you'llsee *lots* of inserts into the filterCache.



-Hoss

Reply via email to