Yes, you are right, thanks for the great reply! I skimmed it so quickly today, so re-read it now, and got the point you mean. I just tried Lucene 2.2.0 (I was using 2.0.0) and i could do add, delete and update docs so smoothly! Based on my tests i did so far, similar to tests I presented in my first email, that i don't have to worry who added and who deleted, and i can get rid of Synchronized java methods ant lead to so slow app performance. I kept maintaining only one open instance of indexWrtier for the whole app. As i stated b4, i suffered of having lock exception. I use flush() instead of close(). In contrast, I create new IndexSearcher instance every time i search. I dislike to open and close then reopen the index searcher over and over. I don't use Indexreader directly anymore, since i do have to use it indirectly using IndexSearcher. I won't try IndexModifier since you told me that IndexWriter in 2.2.0 is much better. Do you think i'm doing good this way i use IndexWriter (one instance for the whole app)? One thing still remaining pending, however I need compass guys for it, is that they do use the new version of lucene or not yet.. i will check with them anyways. I can't have two different versions of jars for the same classes in same package. Final question, I still haven't seen Solr in details, but is it strongly recommended to use it when i have webapps? please write back! cya Rid
> Date: Wed, 1 Aug 2007 13:14:04 -0400> From: [EMAIL PROTECTED]> To: > java-user@lucene.apache.org> Subject: Re: IndexReader deletes more that > expected> On 8/1/07, Ridwan Habbal <[EMAIL PROTECTED]> wrote:>> but what > about runing it on mutiThread app like web application? There> you are the > code: If you are targeting a multi threaded webapp than I strongly suggest > youlook into using either Solr or the LuceneIndexAccessor code. You will > wantto use some form of reference counting to manage your Readers and > Writers. Also, you can now use IndexWriter (Lucene 2.0 and greater I think) > todelete. This allows for efficient mixing of deletes and adds by > bufferingthe deletes, and then opening an IndexReader to commit them later. > This ismuch more efficient than IndexModifier. - Mark _________________________________________________________________ PC Magazine’s 2007 editors’ choice for best web mail—award-winning Windows Live Hotmail. http://imagine-windowslive.com/hotmail/?locale=en-us&ocid=TXT_TAGHM_migration_HMWL_mini_pcmag_0707