Moved to lucene-user.
Peter, also see this:
http://jguru.com/faq/view.jsp?EID=703116
http://jguru.com/faq/view.jsp?EID=587213
http://jguru.com/faq/view.jsp?EID=1042002
Otis
--- Peter Becker <[EMAIL PROTECTED]> wrote:
> And another one...
>
> It seems a reoccuring question but I can't figure out how to do a
> proper
> update of an index. The problem I have is iterating through all
> documents -- I can think of a few hacks for this but there seems to
> be
> no way to just get an iterator/enumeration of all documents. This bit
> of
> code seems to work:
>
> IndexReader reader =
> IndexReader.open(this.indexLocation);
> for(int i = 0; i < reader.maxDoc(); i++) {
> Document doc = reader.document(i);
> if(doc != null) {
> // check if up-to-date, fix if required
> }
> }
>
> but I am a bit suspicious about what happens when I start deleting
> documents from the index. Is this ok? Are there better ways?
>
> Peter
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]