Hi again, I've read http://lucene.apache.org/java/docs/fileformats.html and now I think I know deletable file format.
> How can I get a list of unnecessary files to delete them? I can get such information from deletable file under Win32 environment, correct? Koji > -----Original Message----- > From: Koji Sekiguchi [mailto:[EMAIL PROTECTED] > Sent: Sunday, October 16, 2005 11:05 AM > To: java-user@lucene.apache.org > Subject: delete unnecessary files after optimize() > > > Hello, > > My Tomcat application has several threads. These threads > share a single instance of IndexSearcher to seach contents. > > At some point in time, I have the following index directory: > > -rwx------+ 1 admin admin 158622 Oct 16 10:21 _1pp.cfs > -rwx------+ 1 admin admin 158622 Oct 16 10:21 _2kk.cfs > -rwx------+ 1 admin admin 158622 Oct 16 10:21 _3ff.cfs > -rwx------+ 1 admin admin 158622 Oct 16 10:21 _4aa.cfs > -rwx------+ 1 admin admin 158614 Oct 16 10:20 _uu.cfs > -rwx------+ 1 admin admin 4 Oct 16 10:21 deletable > -rwx------+ 1 admin admin 64 Oct 16 10:21 segments > > In this moment, I want to optimize() the index. I can do it safely > without interrupting Tomcat process. > After optimizing the index, I get a new compounf file _4ab.cfs: > > -rwx------+ 1 admin admin 158622 Oct 16 10:21 _1pp.cfs > -rwx------+ 1 admin admin 158622 Oct 16 10:21 _2kk.cfs > -rwx------+ 1 admin admin 158622 Oct 16 10:21 _3ff.cfs > -rwx------+ 1 admin admin 158622 Oct 16 10:21 _4aa.cfs > -rwx------+ 1 admin admin 791622 Oct 16 10:21 _4ab.cfs > -rwx------+ 1 admin admin 158614 Oct 16 10:20 _uu.cfs > -rwx------+ 1 admin admin 48 Oct 16 10:21 deletable > -rwx------+ 1 admin admin 29 Oct 16 10:21 segments > > Now I can let threads of Tomcat know that we have a new compound > file so that servlet can reopen IndexSearcher to use new segments. > But I want to delete old and unnecessary files (_1pp, _2kk, > _3ff, _4aa and _uu .cfs files) after reopening IndexSearcher > to save disk space. > > How can I get a list of unnecessary files to delete them? > > regards, > > Koji > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]