lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Weiwei Wang <ww.wang...@gmail.com>
Subject Re: Index Update
Date Sun, 13 Dec 2009 11:30:49 GMT
gotcha, thanks, Mike

On Sun, Dec 13, 2009 at 7:28 PM, Michael McCandless <
lucene@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 starting index, if
> anything goes wrong.  If nothing goes wrong, call IndexWriter.commit.
>
> Outside readers, even newly opened ones, will see either the starting
> state, or the finished state, and nothing in between.
>
> Mike
>
> On Sat, Dec 12, 2009 at 10:24 PM, Weiwei Wang <ww.wang.cs@gmail.com>
> wrote:
> > 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 error happend in process 2, rollback is performed
> > 4. finish
> >
> > I used two indexed mainly to do rollback, otherwise the logic may be
> > confused and not very clear.
> >
> >
> > Currently, i'm thinking how to do this job with only one copy of index.
> >
> >
> > On Sun, Dec 13, 2009 at 11:18 AM, Erick Erickson <
> erickerickson@gmail.com>wrote:
> >
> >> 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 changes in
> >> your indexwriter for a long time and risk losing the changes
> >> should your program abort.....
> >>
> >> HTH
> >> Erick
> >>
> >> On Sat, Dec 12, 2009 at 9:08 AM, Weiwei Wang <ww.wang.cs@gmail.com>
> wrote:
> >>
> >> > Gotcha, tThanks, Uwe
> >> >
> >> > 2009/12/12 Uwe Schindler <uwe@thetaphi.de>
> >> >
> >> > > 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: uwe@thetaphi.de
> >> > >
> >> > > > -----Original Message-----
> >> > > > From: Weiwei Wang [mailto:ww.wang.cs@gmail.com]
> >> > > > Sent: Saturday, December 12, 2009 1:25 PM
> >> > > > To: java-user@lucene.apache.org
> >> > > > Subject: Index Update
> >> > > >
> >> > > > Hi, all,
> >> > > >      I need to update my index everyday so as to keep pace with
> >> times.
> >> > > > Current I have two copy of indexes, one is used to provide search
> >> > > service,
> >> > > > the other is used to do updating. Once the updating process is
> done,
> >> I
> >> > > > write
> >> > > > all the updated documents to the index which provide search
> service.
> >> > > >
> >> > > > I want to use only one copy of index,  and do updating searching
> on
> >> the
> >> > > > same
> >> > > > index? Does the updating process will effect the search result
> when
> >> the
> >> > > > updating process is running?
> >> > > >
> >> > > > --
> >> > > > Weiwei Wang
> >> > > > Alex Wang
> >> > > > 王巍巍
> >> > > > Room 403, Mengmin Wei Building
> >> > > > Computer Science Department
> >> > > > Gulou Campus of Nanjing University
> >> > > > Nanjing, P.R.China, 210093
> >> > > >
> >> > > > Homepage: http://cs.nju.edu.cn/rl/weiweiwang
> >> > >
> >> > >
> >> > >
> ---------------------------------------------------------------------
> >> > > To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> >> > > For additional commands, e-mail: java-user-help@lucene.apache.org
> >> > >
> >> > >
> >> >
> >> >
> >> > --
> >> > Weiwei Wang
> >> > Alex Wang
> >> > 王巍巍
> >> > Room 403, Mengmin Wei Building
> >> > Computer Science Department
> >> > Gulou Campus of Nanjing University
> >> > Nanjing, P.R.China, 210093
> >> >
> >> > Homepage: http://cs.nju.edu.cn/rl/weiweiwang
> >> >
> >>
> >
> >
> >
> > --
> > Weiwei Wang
> > Alex Wang
> > 王巍巍
> > Room 403, Mengmin Wei Building
> > Computer Science Department
> > Gulou Campus of Nanjing University
> > Nanjing, P.R.China, 210093
> >
> > Homepage: http://cs.nju.edu.cn/rl/weiweiwang
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>


-- 
Weiwei Wang
Alex Wang
王巍巍
Room 403, Mengmin Wei Building
Computer Science Department
Gulou Campus of Nanjing University
Nanjing, P.R.China, 210093

Homepage: http://cs.nju.edu.cn/rl/weiweiwang

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message