Hi,
   I have requirement of updating search index and it results in creation of 
lots of index files as well as size is also getting increased. I create index 
writer with autocommit true and create false

directory = FSDirectory.getDirectory(indexDir);
docWriter = new IndexWriter(directory, true, analyzer, false);

The index gets updated in specified period of time. At the end of update, I use 
following methods to refresh it 

IndexReader newReader =  reader.reopen();
//Old reader is updated
reader = newReader;

However above steps resulted in creating lots of files.

 segments.gen
 segments_c5
 _4t.cfs
 _5i.cfs
 _5v.cfs
 _5w.cfs

And also lots of duplicate entries keep of increasing. In order to avoid 
duplicate, I have developed a customized method to remove duplicates in index. 
However still number and size of index gets increased, though actual update is 
very few.

Appreciate your help on this.

regards,
RB

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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

Reply via email to