lucy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marvin Humphrey <>
Subject Re: [lucy-user] Splicing in a bit of caching in remote searcher
Date Mon, 07 Nov 2011 21:16:16 GMT
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()

Marvin Humphrey

View raw message