Hi Dick, > I only see one difference in the constructor of the IndexWriter class: > "closeDir" is 'true' in my scenario and 'false' in your scenario. What is > reason for this difference? And if there is a valid reason, it might be > useful to add this to the javaDoc of the IndexWriter class.
The important difference is: > > private Directory getDirectory() throws IOException { > > if( directory == null ){ > > directory = FSDirectory.getDirectory( indexDir, true ); > > } > > return directory; > > } this method instantiates FSDirectory object only once. But in your original code, calling IndexWriter( String,Analyzer,boolean) version with create=true: > public IndexWriter(String path, Analyzer a, boolean create) > throws IOException { > this(FSDirectory.getDirectory(path, create), a, create, > true); > } it always makes new FSDirectory object. regards, Koji --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]