On Mon, Nov 7, 2011 at 11:16 PM, Marvin Humphrey <[email protected]> wrote:
> On Mon, Nov 07, 2011 at 10:48:19PM +0200, goran kent wrote:
>> Can you think of any unexpected issues which might arise from caching
>> top_docs() and not other elements of a search transaction?
>
> The top_docs() method is where the search happens.  The results for a given
> set of arguments should be deterministic for the life of a Searcher.
>
> It occurs to me now that top_docs() also takes two other params in addition to
> the query: sort_spec and num_wanted.  Clearly, num_wanted must be part of the
> cache key as well.  So too must the sort_spec if it is changing, which may
> complicate matters as SortSpec does not presently have a useful to_string()
> method.

great - my sortspec never changes, so that's no problem.

Thanks!

Reply via email to