: Its still not keeping the segments file around.     Is that necessary?

You seem to have some code at the end that (i'm guess) is supposed to
remove older copies of the index.  Are you sure that code does what you
think it does?  Have you tried commenting it out and seeing if that fixes
your problem?  There may be a bug in that code (I didn't read it that
closely) ...


:           String newPath = getIndexLocation() + File.separator +
: System.currentTimeMillis();
:
:           IndexWriter writer = new IndexWriter(new File(newPath),
: analyzer, true);

        ...

:         writer.optimize();
:         writer.close();
:
:       SearchSO.setSearcher(newPath);
:
:       File[] subFiles;
:       File[] subDirs = new File(getIndexLocation()).listFiles();
:
:       for (int i=0;i<subDirs.length;i++) {
:               if (subDirs[i].isDirectory()) {
:                       if (!newPath.equals(subDirs[i].getPath())) {
:                               subFiles = subDirs[i].listFiles();
:                               for (int j=0;j<subFiles.length;j++) {
:                                       subFiles[j].delete();
:                               }
:                               subDirs[i].delete();
:                       }
:               }
:       }
:
:
:     }


-Hoss


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to