Please ATTACH the patch here.

On Mon, Oct 19, 2009 at 12:04 AM, mathieu <[email protected]> wrote:

>
> I was also wondering why there isn't access to the ISessionFactory
> from IFullTextSession (as in Hibernate.Search), so I've added it, too.
>
> Here is the patch (as I can't manage to add attachments...) :
>
> -- BEGIN PATCH
> Index: NHibernate.Search/IFullTextSession.cs
> ===================================================================
> --- NHibernate.Search/IFullTextSession.cs       (revision 1058)
> +++ NHibernate.Search/IFullTextSession.cs       (working copy)
> @@ -37,5 +37,10 @@
>         /// </summary>
>         /// <param name="clazz"></param>
>         void PurgeAll(System.Type clazz);
> +
> +        /// <summary>
> +        /// Gets the SearchFactory associated with this session
> +        /// </summary>
> +        ISearchFactory SearchFactory { get; }
>     }
>  }
> \ No newline at end of file
> Index: NHibernate.Search/Impl/FullTextSessionImpl.cs
> ===================================================================
> --- NHibernate.Search/Impl/FullTextSessionImpl.cs       (revision 1058)
> +++ NHibernate.Search/Impl/FullTextSessionImpl.cs       (working copy)
> @@ -29,7 +29,7 @@
>             this.sessionImplementor = (ISessionImplementor) session;
>         }
>
> -        private ISearchFactory SearchFactory
> +        public ISearchFactory SearchFactory
>         {
>             get
>             {
> Index: NHibernate.Search/Impl/SearchFactoryImpl.cs
> ===================================================================
> --- NHibernate.Search/Impl/SearchFactoryImpl.cs (revision 1058)
> +++ NHibernate.Search/Impl/SearchFactoryImpl.cs (working copy)
> @@ -307,7 +307,7 @@
>
>             List<LuceneWork> queue = new List<LuceneWork>();
>             queue.Add(new OptimizeLuceneWork(entityType));
> -            WaitCallback cb =
> BackendQueueProcessorFactory.GetProcessor(queue);
> +            BackendQueueProcessorFactory.GetProcessor(queue)(null);
>         }
>
>         public Dictionary<IDirectoryProvider, object>
> GetLockableDirectoryProviders()
>
> -- END PATCH
>
> On 18 oct, 15:30, mathieu <[email protected]> wrote:
> > Hello everyone,
> >
> > I posted this one on nhusers, but as it is a "patch", I think it
> > belongs here. If it isn't the case, feel free to "moderate" this
> > message.
> >
> > Index optimization is not working when I call
> > "SearchFactoryImpl.GetSearchFactory
> > (cfg).Optimize(typeof(MyEntity));"
> >
> > In SearchFactoryImpl.cs (rev 1051)
> > Line 310 : WaitCallback cb = BackendQueueProcessorFactory.GetProcessor
> > (queue);
> > Nothing is done with the WaitCallBack.
> > Should'nt the line be :
> > BackendQueueProcessorFactory.GetProcessor(queue)(null) ?
> >
> > According to SearchFactoryImpl.java (hibernate.search 3.1.1) :
> > Line 353 : getBackendQueueProcessorFactory().getProcessor( queue ).run
> > ();
> >
> > Thank you
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"NHibernate Contrib - Development Group" 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.ar/group/nhcdevs?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to