lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 26196] - IndexWriter problem when create set to false
Date Thu, 04 Mar 2004 17:13:41 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26196>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=26196

IndexWriter problem when create set to false





------- Additional Comments From cutting@apache.org  2004-03-04 17:13 -------
I read this as a feature request.

You'd like a "smart" constructor that creates the index if it doesn't exist. 
Such constructors could easily be written:

public IndexWriter(String d, Analyzer a) throws IOException {
  this(d, a, !IndexReader.indexExists(d));
}

public IndexWriter(File d, Analyzer a) throws IOException {
  this(d, a, !IndexReader.indexExists(d));
}

public IndexWriter(Directory d, Analyzer a) throws IOException {
  this(d, a, !IndexReader.indexExists(d));
}

Is this what you're after?  Is it worth adding these when they're so simple that
doing without them doesn't even require another line of code?  Perhaps.

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


Mime
View raw message