[Xapian-discuss] search without flush.

Olly Betts olly at survex.com
Wed Jun 10 06:19:25 BST 2009


On Tue, Jun 02, 2009 at 02:20:03PM +1000, Richard Heycock wrote:
> Is it possible to perform a search without flushing the index? I've got
> an application that updates the index every 4 hours but I need to be
> able to search the new data fairly quickly after the index is updated.
> The problem revolves around the fact that the update is often much less
> than 10 000 documents so it isn't being flushed until quite a bit
> latter. I realise I can do a flush after the documents have been updated
> but I was trying to avoid the flush.

If I can make an analogy here, think of loading a file in to your text
editor and modifying it.  If you want to use the modified version,
either you need to save the file so that other processes can see it
(flush) or use the file in the text editor process (which is what
Richard Boulton suggests).

Hopefully this analogy illuminates why reading the unflushed changes
from other processes isn't possible - it's precisely the act of flushing
which makes them visible to those processes.

Cheers,
    Olly



More information about the Xapian-discuss mailing list