lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <luc...@mikemccandless.com>
Subject Re: Query in IndexWriter.deleteDocuments(Term term)
Date Sat, 26 Jul 2008 12:12:08 GMT

Ajay Garg wrote:

> Thanks Mike. That was quite explanatory. A couple of doubts:

You're welcome!

> 1. The deletions apply to buffered as well as stored-in-RAM documents.
> Right. So, if the index directory contains 1 document that matches a
> deleteDocument query, and 1 document in RAM that contains the same
> deleteDocument query, then, will the document-in-index-directory be  
> deleted
> immediately, or when a flush is called. (It seems logical, that  
> irrespective
> of the location of document, "actual" deletion occurs only when a  
> flush is
> called .. just need to be doubly sure ...)

Well ... the "actual" deletion (visible to an IndexReader that opens  
the index) is only guaranteed to be performed if you call commit()  
(trunk) or close() (2.3, trunk) on the IW.

First, deleted docIDs, terms and queries are simply buffered in RAM.   
Then at some point (no guarantee on when) they are flushed into per- 
segment .del files in the directory, but, these del files are  
"unreferenced" (by a segments_N file) until commit() or close() is  
called.

> 2. Yes I am planning to rewrite a project using Lucene 2.3.2. So, is  
> the
> next version heading straight to 3.0 ??? (Sorry, if this question  
> seems to
> be a little out of context of the current thread)

The current plan is to have a 2.4 release next, then a 2.9 release and  
finally 3.0.  It's spelled out a bit here:

     http://wiki.apache.org/lucene-java/Java_1.5_Migration

But there are no dates attached to those bullets!

Mike

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message