Re: Index Update

2009-12-13 Thread Weiwei Wang
gotcha, thanks, Mike On Sun, Dec 13, 2009 at 7:28 PM, Michael McCandless < luc...@mikemccandless.com> wrote: > IndexWriter is transactional: if you do the deletes & adds during a > single IndexWriter session (ie, no commit in between), then simply > call IndexWriter.rollback to get back to your s

Re: Index Update

2009-12-13 Thread Michael McCandless
IndexWriter is transactional: if you do the deletes & adds during a single IndexWriter session (ie, no commit in between), then simply call IndexWriter.rollback to get back to your starting index, if anything goes wrong. If nothing goes wrong, call IndexWriter.commit. Outside readers, even newly

Re: Index Update

2009-12-12 Thread Weiwei Wang
What I'm doing now is to indexing all file paths in a bunch of ftp servers. For ftp server administrator, he can add, delete or rename the files. So as to keep pace with times, i need to do updating very often. the process should be: 1. delete the old documents 2. add the new crawled ones 3. if e

Re: Index Update

2009-12-12 Thread Erick Erickson
Quick addition. Even if you commit/close your indexwriter, you *still* won't see the changes in your search unless you repoen the indexreader. But you have to do both (in the order above) to see all the changes you've added via your indexwriter. but there's no reason to hold off on committing

Re: Index Update

2009-12-12 Thread Weiwei Wang
Gotcha, tThanks, Uwe 2009/12/12 Uwe Schindler > No. As long as you not commit or close the IndexWriter and reopen the > IndexReader on the search side, nothing happens on the search side. > > Copying like you do is absolutely not needed. > > - > Uwe Schindler > H.-H.-Meier-Allee 63, D-28213

RE: Index Update

2009-12-12 Thread Uwe Schindler
No. As long as you not commit or close the IndexWriter and reopen the IndexReader on the search side, nothing happens on the search side. Copying like you do is absolutely not needed. - Uwe Schindler H.-H.-Meier-Allee 63, D-28213 Bremen http://www.thetaphi.de eMail: u...@thetaphi.de > -O

Re: index update problems with Linux

2008-01-19 Thread Otis Gospodnetic
Kevin, I don't see writer.close() in your code snippet. Otis -- Sematext -- http://sematext.com/ -- Lucene - Solr - Nutch - Original Message From: Kevin Dewi <[EMAIL PROTECTED]> To: java-user@lucene.apache.org Sent: Friday, January 18, 2008 6:33:43 AM Subject: index update problems wit

Re: index update problems with Linux

2008-01-18 Thread 游泳池的鱼
it seems that close reader not release write lock, test lock release before you add document 2008/1/18, Kevin Dewi <[EMAIL PROTECTED]>: > > Hello, > > I have a problem with this code (updating a lucene index by delete and > adding documents): > > > IndexReader reader = IndexReader.open(directory)

Re: Index Update Strategies

2007-04-26 Thread Otis Gospodnetic
Hi Andreas, There are two important parts here: 1) Index updates will impact search - just think about the disk IO. 2) You will further slow down the search speed by re-opening the index after detecting a change, as each new re-opening of IndexReader will have to read some of the index data. So

Re: index update with database insertion

2006-08-21 Thread Michael McCandless
Jason Polites wrote: I'm not sure about the solution in the referenced thread. It will work, but doesn't it run the risk of breaching the transaction isolation of the database write? The issue is when the index is notified of a database update. If it is notified prior to the transaction commi

Re: index update with database insertion

2006-08-21 Thread Jason Polites
I'm not sure about the solution in the referenced thread. It will work, but doesn't it run the risk of breaching the transaction isolation of the database write? The issue is when the index is notified of a database update. If it is notified prior to the transaction commit, and the commit fails

Re: index update with database insertion

2006-08-21 Thread Michael McCandless
> In my project,I want to update the lucene's index when there has database > insertion operations,in this way,my users could search the fresh information > immediately if someone inserted the information into database.That's what I > need,could someone give me suggestions to implement my need?