Hi Peter

>>>>> "Peter" == Peter Fein <[EMAIL PROTECTED]> writes:
Peter> On Thursday 04 January 2007 14:13, Terry Jones wrote:
>> I have a fairly simple question about trying to write a long-running
>> BSD-based reader/writer class. I've written something that works, but it's

Peter> If you want to go the route your going, I'd recommend setting up a
Peter> single class to manage the Directory, IndexSearcer & IndexWriter.
Peter> Basically, the idea is to provide access to the searcher & writer
Peter> via properties.  Accessing one closes the other if it's open.

Thanks. I made a change to do this last night. It's (relatively) very fast.
That's enough for now I guess, but I'm going to have to revisit this for
sure. The main problems are worst-case alternating read/write requests and
also that you don't get to do transactions simply. But for now I can live
with it - at least the thing runs quickly.

Peter> Andi's suggestion of using a RAMDir & merging is probably best.  If
Peter> you need immediate access to the just-added doc, you can do that
Peter> with a MultiSearcher.  Though to be honest, I'd suggest thinking
Peter> about other ways to structure your application.[2]

Thanks, I'll take a look at MultiSearcher too.

Peter> [0] Has anyone else had difficulties w/ bsddb (outside PyLucene)?
Peter> Despite it's excellent reputation, it's given us lots of trouble.
Peter> We've been using gdbm instead.

I've only used it lightly, and never had problems. There seem to be many
successful uses, but also others encountering real problems. My impression
is that it's great but fiddly to get everything right. But that's just an
impression.

>From http://divmod.org/trac/wiki/WhitherAtop

| Q: Isn't BSDDB awesome? Why'd you abandon it?
| 
| A: For what it is: yes. However, what it is, is a fairly special-purpose
| tool. Also, it is VERY hard to handle correctly. After literally years of
| experimentation, we have determined the documentation to be incorrect on a
| few very important points related to reliability. I think we managed a good
| deal better than Subversion did, but the SVN community's endemic problems
| with bsddb are well-documented.

Also, the ZODB folks dropped support for BSDDB as a back end. I don't know
exactly why. I think in an email someone told me there was no-one to
maintain it. Also, if you follow this thread

  http://twistedmatrix.com/pipermail/twisted-python/2006-November/014419.html

you'll see strong recommendations to switch trac instances to use fsfs
instead of BSD.

Terry
_______________________________________________
pylucene-dev mailing list
[email protected]
http://lists.osafoundation.org/mailman/listinfo/pylucene-dev

Reply via email to