After some code searching, it looks like nothing is done with the
WaitCallBack  on Line 350 of SearchFactoryImpl.cs : "WaitCallback cb =
BackendQueueProcessorFactory.GetProcessor(queue);"

Or, looking at SearchFactoryImpl.java, line 353 :
"getBackendQueueProcessorFactory().getProcessor( queue ).run();", the
"callback" is runned immediately. Is it possible to modify the source
code of SearchFactoryImpl.cs like this :

"BackendQueueProcessorFactory.GetProcessor(queue)(null);" ?

If I do it, optimization goes well. But I may be missing some
implications of doing this...

On 16 oct, 12:02, mathieu <[email protected]> wrote:
> 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