开发者

Using LinqToLucene With NHibernate and NHibernate.Search

开发者 https://www.devze.com 2022-12-21 05:08 出处:网络
Does anyone already use LinqToLucene with NHibernate.Search? H开发者_运维技巧ow to getting started ?

Does anyone already use LinqToLucene with NHibernate.Search?

H开发者_运维技巧ow to getting started ?

Thanks.


LinqToLucene and NHibernate.Search are incompatible. They both do the job of providing the ability to index and search based upon entities. They are complete by themselves.

The nice thing about NHibernate.Search is the integration with NHibernate to help maintain the index. However, you if are using NHibernate and LinqToLucene you can still achieve most of the same integration that NHibernate.Search has by implementing your own NHibernate Events.

A good example of implementing an event is here:

http://nhforge.org/wikis/howtonh/creating-an-audit-log-using-nhibernate-events.aspx

So to create your own, you would just create a post-insert, post-update, and post-delete event and make your co-responding LinqToLucene actions here.

0

精彩评论

暂无评论...
验证码 换一张
取 消