good day, everyone. i hope i can find some help here with my "small" problem. there is an asp.net project utilizing nHibernate as a DAL and Lucene.Net via nHibernate.Search to impletent FT search. database is updated quite frequently (about 3 times a minute). At the test database there are about 200000 "indezable" objects and lucene index size is about 62 Mb. database "update" involves updating entities, removing entities, adding entities, there can be 1000 entities per transaction. and i run to a very big performance problems. here is a sample from nHibernate log file:
19:37:05,145 LuceneWorker — remove from Lucene index: SampleApp.Organization#48 19:37:16,739 LuceneWorker — Add to Lucene index: SampleApp.Organization#48: Document<stored/uncompressed,indexed<_hibernate_class:SampleApp.Organization, SampleApp> stored/uncompressed,indexed<ID:48> indexed,tokenized<Name:***>> 19:37:19,693 LuceneWorker — Add to Lucene index: SampleApp.Order#121795: Document<stored/uncompressed,indexed<_hibernate_class:SampleApp.Order, SampleApp> stored/uncompressed,indexed<ID:121795> indexed,tokenized<Name:***> indexed,tokenized<Descrition:***>> 19:37:20,927 LuceneWorker — Add to Lucene index: SampleApp.Order#121794: Document<stored/uncompressed,indexed<_hibernate_class:SampleApp.Order, SampleApp> stored/uncompressed,indexed<ID:121794> indexed,tokenized<Name:***> indexed,tokenized<Descrition:***>> 19:37:20,927 LuceneWorker — Add to Lucene index: SampleApp.Order#121796: Document<stored/uncompressed,indexed<_hibernate_class:SampleApp.Order, SampleApp> stored/uncompressed,indexed<ID:121796> indexed,tokenized<Name:***> indexed,tokenized<Descrition:***>> 19:37:20,927 LuceneWorker — Add to Lucene index: SampleApp.Order#121798: Document<stored/uncompressed,indexed<_hibernate_class:SampleApp.Order, SampleApp> stored/uncompressed,indexed<ID:121798> indexed,tokenized<Name:***> indexed,tokenized<Descrition:***>> 19:37:20,927 LuceneWorker — Add to Lucene index: SampleApp.Order#121797: Document<stored/uncompressed,indexed<_hibernate_class:SampleApp.Order, SampleApp> stored/uncompressed,indexed<ID:121797> indexed,tokenized<Name:***> indexed,tokenized<Descrition:***>> 19:37:20,974 NHibernate.Transaction.AdoTransaction — IDbTransaction disposed. 19:37:20,974 NHibernate.Impl.SessionImpl — running ISession.Dispose() 19:37:20,974 NHibernate.Impl.SessionImpl — closing session 19:37:20,974 NHibernate.AdoNet.AbstractBatcher — running BatcherImpl.Dispose(true)
what happened in real (in nHibernate): 1. Organization#48 was updated (in fact indexed field was not changed) 2. 5 Orders where removed 3. 5 new orders where added.
following facts seems quite confusing to me: 1. why, not the name of thor, deletion of Organizion#48 took 11 seconds ?! 2. addnig new Organization took 3 seconds, although indexed field had 6 words and 80 chars in total 3. why document gets deleted when i update it? lucene does not support updates? 4. where are 5 removed orders?
|