Fluent NHibernate + Lucene Search (NHibernate.Szukaj)
Używam Fluent NHibernate i chciałbym zaimplementować NHibernate.Szukaj z Lucene, ale nie mogę znaleźć żadnych przykładów, jak to zrobić z Fluent NHibernate. Wygląda na to, że są dwa kroki. (Według )
-
Ustaw właściwości Hibernate w konfiguracji:
- hibernate.Szukaj.default.directory_provider
- hibernate.Szukaj.default.indexBase
- hibernate.Szukaj.analizator
-
Inicjalizacja Event Listeners to index persisted objcts
- Konfiguracja.SetListener (ListenerType.PostUpdate, new FullTextIndexEventListener ());
- Konfiguracja.SetListener (ListenerType.PostInsert, new FullTextIndexEventListener ());
- Konfiguracja.SetListener (ListenerType.PostDelete, new FullTextIndexEventListener ());
Wymyśliłem, jak dodać właściwości do konfiguracji źródła Fluent NHibernate, ale nie mogę znaleźć, gdzie Zdarzenie Słuchacze gotowi.
3
Author: Ryan Montgomery, 2009-02-15
2 answers
Jeśli używasz API Fluent Configuration , wystarczy użyć metody ExposeConfiguration
, Aby uzyskać instancję konfiguracji NHibernate.
Fluently.Configure()
.Database(...)
.Mappings(...)
.ExposeConfiguration(cfg =>
{
cfg.SetListener(...);
cfg.SetListener(...);
})
.BuildSessionFactory();
5
Author: James Gregory,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2009-02-16 10:01:45
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2009-02-16 10:01:45
Pracuję nad Fluent API dla Lucene, który usuwa potrzebę atrybutów i jest ładnie zintegrowany z FNH
Its still very pre-alpha, contributions welcome!
1
Author: Andrew Bullock,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2010-05-14 15:04:43
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/doraprojects.net/template/agent.layouts/content.php on line 54
2010-05-14 15:04:43