Hi Yonik,

I'm still confused.

 suspect don't understand how paging and caching interact.  I probably need
to walk through the code.  Is there a unit test that exercises
SolrIndexSearcher.getDocListC
or a good unit test to use as a base to write one?


Part of what confuses me is whether what gets cached always starts at row 1
of results.  I did not think this was true, but your example of start=10000
rows = 10 (ie rows 10000-through 10010) triggering the
queryResultMacDocsCached limit of 200 makes it sound like the cache always
starts at row 1.  I would have thought that a request for start= 10,000
 rows=10,010 would result in Solr caching rows 10,000-10,020.

I'll try to explain my confusion.
Using the defaults in the solrconfig example:
<queryResultWindowSize>20</queryResultWindowSize>
<queryResultMaxDocsCached>200</queryResultMaxDocsCached>

If I query for start=0, rows =10  Solr fetches 20 results and caches them.
If I query for start =11 rows =10 Solr read rows 11-20 from cache
What happens when I query for start = 21 rows= 10?
I thought that Solr would then fetch rows 21-40 into the queryResultCache.
Is this wrong?

If I query for start =195 rows =10  does Solr cache rows 195-200 but go to
disk for rows over 200 (queryResultMaxDocsCached=200)?   Or does Solr skip
caching altogether for rows over 200



Tom

On Wed, Sep 24, 2014 at 7:12 PM, Yonik Seeley <yo...@heliosearch.com> wrote:

> On Wed, Sep 24, 2014 at 5:27 PM, Tomás Fernández Löbbe
> <tomasflo...@gmail.com> wrote:
> > I think you are right. I think the name is this because it’s considering
> a
> > series of queries paging a result. The first X pages are going to be
> cached,
> > but once the limit is reached, no further pages are and the last superset
> > that fitted remains in cache.
>
> I was confused about the confusion ;-)  But your summary seems correct.
>
> queryResultWindowSize rounds up to a multiple of the window size for
> caching purposes.
> So if you ask for top 10, and the queryResultWindowSize is 20, then
> the top 20 will be cached (so if a user hits "next" to get to the next
> 10, it will still result in a cache hit).
>
> queryResultMaxDocsCached sets a limit beyond which the resulting docs
> aren't cached (so if a user asks for docs 10000 through 10010, we skip
> caching logic).
>
> -Yonik
> http://heliosearch.org - native code faceting, facet functions,
> sub-facets, off-heap data
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
> For additional commands, e-mail: dev-h...@lucene.apache.org
>
>

Reply via email to