lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dan Armbrust <>
Subject Re: 1.9 RC1
Date Fri, 17 Feb 2006 18:50:53 GMT
I'd like to see this improvement request implemented - but I'm not sure 
if 1.9 or 2.0 would be a better place to do it:

Short summary - The Constructor for IndexWriter currently will only 
create an index in a folder if you set the boolean create flag to true. 
  But then, if you want to append to that index, you have to set the 
create flag to false (otherwise it overwrites)

In my use cases, I seldom want to overwrite an index - but I often 
create new ones, and append to existing ones.  Forgetting to switch the 
boolean flag between the initial create and the append causes data loss.

To me, a better, safer API would be to change the parameter named 
"create" into "clear" - and then change the behavior so that is always 
creates a new index at the specified location if one doesn't already exist.

If clear is false - it would append (same as current behavior) - and if 
clear is true is would clear first, and then create a new index.  So 
nobody using the API should break.


Daniel Armbrust
Biomedical Informatics
Mayo Clinic Rochester

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message