[Xapian-discuss] question about trigger of reopen

Xu Chen chenxu06 at gmail.com
Thu Dec 20 14:04:27 GMT 2012


Hi James,
Thank you for your explanation. I changed the implementation according to
your suggestion and it works.

*
Best regards!*

*Xu Chen***


On Wed, Dec 19, 2012 at 11:46 PM, James Aylett <james-xapian at tartarus.org>wrote:

> I'm not sure what you think is wrong with this behavior. The way that
> Xapian works, you only get DatabaseModifiedError if two flushed
> modifications have been written to the database since you opened it in the
> reader. If you need readers to "notice" new or changed documents faster
> than you're currently seeing, you'll need to have them periodically reopen
> the database even if they don't get the modified error.
>
> James
>
> On 19 Dec 2012, at 03:20, Xu Chen <chenxu06 at gmail.com> wrote:
>
> > Hi all,
> > Currently I'm implementing a retrieval system with multiple reader
> > processes and only one writer process updating the database periodically.
> > In a reader process, whenever a Xapian::DatabaseModifiedError exception
> is
> > caught, I call function reopen() and retry.
> >
> > However, my problem is, when there is only a small set of modification,
> > e.g. only one new document is added, the reader would never get the
> > DatabaseModifiedError and hence would not call reopen. I am sure that
> I've
> > called commit() in the writer process.
> >
> > Could anybody please tell me what's going wrong here?
> >
> > Thank you very much.
> > *
> > Best regards!*
> > *Xu Chen*
> > _______________________________________________
> > Xapian-discuss mailing list
> > Xapian-discuss at lists.xapian.org
> > http://lists.xapian.org/mailman/listinfo/xapian-discuss
>
> --
>  James Aylett, occasional trouble-maker
>  xapian.org
>
>


More information about the Xapian-discuss mailing list