Re: Need Help: Index directory files getting deleted due to server restart.

2011-07-29 Thread Chris Hostetter
: It is strange that I was suggested not to call commit explicitly and leave : it to the lucene but it seems it has its own disadvantages. as long as you commit/close the writer cleanly on shutdown you should be fine ... i don't think you need to be so agressive as to call it on ever X docs (un

Re: Need Help: Index directory files getting deleted due to server restart.

2011-07-29 Thread Saurabh Gokhale
Hi Ian Thanks for looking into the issue. And you are right. Its not this code which was causing the issue. The issue was as follows: (I just successfully performed a test run) *ISSUE:* My code had following characteristics. 1. CREATE_OR_APPEND way of opening indexWriter. 2. No explicit call to

Re: Need Help: Index directory files getting deleted due to server restart.

2011-07-29 Thread Ian Lea
Code looks fine and will not zap the current contents of indexDir. Something else must be - another call with OpenMode.CREATE? Where is indexDir - could tomcat be zapping it on startup? Some other job? -- Ian. On Thu, Jul 28, 2011 at 8:12 PM, Saurabh Gokhale wrote: > Hi All, > > I am using f