Java Mailing List Archive

http://www.java2.5341.com/

Home » java-user.lucene »

Problem with updating Index continuously

ajaxtrend

2008-10-20

Replies: Find Java Web Hosting

Author LoginPost Reply
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: java-user-unsubscribe@(protected)
For additional commands, e-mail: java-user-help@(protected)

©2008 java2.5341.com - Jax Systems, LLC, U.S.A.