The standard answer is "try deleting/adding in batches instead of individually". Seems more efficient, too, if you can write your application that way. That is what you are essentially doing by writing to a separate index and then doing a bunch of deletions, followed by re-additions. I know I'm stating the obvious, but I wanted to get this out of the way :)
Otis --- "Spencer, Dave" <[EMAIL PROTECTED]> wrote: > [1] There's no update so delete and then add is what you want. > [2] I have had the same problems w/ using an IndexWriter and > IndexReader > at the same time and getting a locking problem when deleting. I think > I > sent > mail to the list w/ a test case a week ago [disclaimer: this is not > a complaint!] and I think the issue is still open. Maybe I should > turn > this > into a bug report? I know fixing bugs is encourage but I don't have > enough > context about the right solution, or how the locking apparently > changed to foul this up, though I did look thru things. > My workaround was to write new entries to a new index and then run > a separate merge utility that 1st does a delete pass, and then > reopens > and does adds, based on a "primary key" (the URL of each doc in my > case). > > > -----Original Message----- > From: Joe Hajek [mailto:[EMAIL PROTECTED]] > Sent: Wednesday, March 20, 2002 12:28 AM > To: [EMAIL PROTECTED] > Subject: Question Deleting/Reindexing Files > > > Hi, > > I am using Lucene for indexing a relatively large article based > system > where articles change from time to time so i have to reindex them. > reindexing had the effekt that a query would return the hit for a > file > multiple times (according to the number of updates. > > The only solution to that problem I found was to delete the file to > be > updated before indexing it again. Is there another possibility ? > > As the system is large i am collecting the articles that have to be > updated together, open a writer and add the documents to the index. > this > solution worked fine for me using rc1 in rc4 it seems that it is not > possible anymore to delete a file from an index while the index is > opened for writing. > > do you know any solutions to that problem ? > > thanx a lot in advance > > regards joe > > -- > To unsubscribe, e-mail: > <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: > <mailto:[EMAIL PROTECTED]> > > -- > To unsubscribe, e-mail: > <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: > <mailto:[EMAIL PROTECTED]> > __________________________________________________ Do You Yahoo!? Yahoo! Sports - live college hoops coverage http://sports.yahoo.com/ -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
