There is also the other side of that, searchers are only limited to seeing
what the index was at the time of opening the searcher.We probably need to
provide some strategy to decide how we can share the index searchers.

On Tue, Sep 1, 2009 at 11:20 AM, aterreno <[email protected]> wrote:

>
> Hi all,
> after some enthusiasm on NHibernate.Search we incurred in some bad
> performances issues, especially searching and sorting (two fields
> sort) entities.
>
> We decided to implement our search using plain Lucene.Net and writing
> our custom code to persist and find the NHibernate objects.
>
> However now I would like to understand why the search was so slow.
>
> We had a look to the NH.Search code and one piece of code seemed to be
> "the bottleneck"
>
> The method "public override void List(IList list)" in
> FullTextQueryImpl Opens (at the beggining) and finally closes (at
> least that's my impression) a IndexSearcher every time it's called.
>
>            IndexSearcher searcher = BuildSearcher();
>
>            //... do stuff
>
>            finally
>            {
>                CloseSearcher(searcher);
>            }
>
> Reading Lucene in Action at some point the author says that first
> query is always slow on the IndexSearcher (in fact he suggests to
> "warm up" the application performing a search).
>
> With that close (and therefore the necessary open) it's impossible for
> Lucene to cache the objects and every call is expensive and reads on
> the disk...
>
> Am I wrong?
>
> Thanks for reading my rant!
>
> toni
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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