> On Tue, May 17, 2011 at 6:17 PM, Markus Jelsma > > <markus.jel...@openindex.io> wrote: > > I'm not sure. The filter cache uses your filter as a key and a negation > > is a different key. You can check this easily in a controlled > > environment by issueing these queries and watching the filter cache > > statistics. > > Gotta hate crossing emails ;-)
I love it, it gives me a smile :) > Anyway, this goes back to Solr 1.1 > > 5. SOLR-80: Negative queries are now allowed everywhere. Negative queries > are generated and cached as their positive counterpart, speeding > generation and generally resulting in smaller sets to cache. > Set intersections in SolrIndexSearcher are more efficient, > starting with the smallest positive set, subtracting all negative > sets, then intersecting with all other positive sets. (yonik) > > -Yonik > http://www.lucenerevolution.org -- Lucene/Solr User Conference, May > 25-26, San Francisco > > >> If I have a query with a filter query such as : " q=art&fq=history" and > >> then run a second query "q=art&fq=-history", will Solr realize that it > >> can use the cached results of the previous filter query "history" (in > >> the filter cache) or will it not realize this and have to actually do a > >> second filter query against the index for "not history"? > >> > >> Tom