Hello again everyone

I can't manage to optimize my lucene index. Here is the code :

            using (var sf = cfg.BuildSessionFactory())
            {
                using (var session = sf.OpenSession())
                {
                    using (var search = Search.CreateFullTextSession
(session))
                    {
                        using (var tx = session.BeginTransaction())
                        {
                            var es = search.CreateCriteria<MyEntity>
().List();

                            foreach (var e in es)
                            {
                                search.Index(e);
                            }

                            SearchFactoryImpl.GetSearchFactory
(cfg).Optimize(typeof(MyEntity));

                            tx.Commit();
                        }
                    }
                }
            }

When I launch this code the first time, I get 4 directories : MyEntity.
0 to MyEntity.3 each of them with cfs files.
When I launch this code twice, I get .del files inside those
directories, and those never get deleted.

In PostTransactionWorkQueueSynchronization, AfterCompletion runs, with
"success" set to "true". But my optimization work doesn't seem to be
in the queue.

Am I doing something wrong ?

Thanks in advance.



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to