On 5/30/06, maustin75 <[EMAIL PROTECTED]> wrote:
> The same speed if they are in Solr's cache :-)
> Range query will be slightly slower, but if it becomes a bottleneck or
> not depends on the total complexity of the queries/requests.

What does the cache use as a key to determine if it is cached?

For example, how many bitsets are cached here with these to searches?

"+id:test1 +id:test2"
and.
"+id:test2 +id:test1"

The Query acts as the cache key.
There is currently no normalization done to make "a AND b" equiv to "b AND a".
This often isn't much of a problem for programatically generated
queries since they are generated the same way each time.

Does solr parse and cache each queryitem or the entire search query?

The entire query, filter, and sort acts as the cache key into the
queryResult cache.  The results of that query aren't fully cached
though, only a subset.

Here is the relevant portion of solrconfig.xml:
  <!-- An optimization for use with the queryResultCache.  When a search
        is requested, a superset of the requested number of document ids
        are collected.  For example, of a search for a particular query
        requests matching documents 10 through 19, and queryWindowSize is 50,
        then documents 0 through 50 will be collected and cached.  Any further
        requests in that range can be satisfied via the cache.  -->
   <queryResultWindowSize>10</queryResultWindowSize>


-Yonik

Reply via email to