[Xapian-discuss] search without flush.
Richard Heycock
rgh at roughage.com.au
Wed Jun 10 07:02:07 BST 2009
Excerpts from Olly Betts's message of Wed Jun 10 15:19:25 +1000 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.
That does make sense! One other question then is what happens if the
program doing the updating crashes? Is the data lost?
rgh
> Cheers,
> Olly
More information about the Xapian-discuss
mailing list