[Xapian-discuss] Avoiding "stale" Search Results

Olly Betts olly at survex.com
Wed May 20 15:57:30 BST 2009


On Wed, May 20, 2009 at 06:24:17AM -0700, Miki Tebeka wrote:
> I don't want to keep old revisions around in the database, just in the
> result returned from a search.

But the results are read from the database on demand, so we'd need to
keep the revision that was searched in the database to achieve that.

> From a bit of experimenting, this problem is caused by the Python __repr__
> which tried to some more information from the database.

Sorry, not sure what __repr__ does...

> I guess I'm looking for a way to make the results not lazy.

There isn't one (well, unless xappy provides something). It would be
slow to eagerly read everything you might want that is reachable from
any entry in the MSet, especially with the remote backend.  Better to
just let the user go through and read what they actually need if they
don't want it to be read on demand.

Cheers,
    Olly



More information about the Xapian-discuss mailing list