incubator-lucy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From goran kent <gorank...@gmail.com>
Subject Re: [lucy-user] Splicing in a bit of caching in remote searcher
Date Tue, 08 Nov 2011 09:40:41 GMT
On Mon, Nov 7, 2011 at 11:16 PM, Marvin Humphrey <marvin@rectangular.com> 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!

Mime
View raw message