开发者

IndexedEmbedded not updating other side of relationship?

I have a one to many, let's say company开发者_高级运维-to-employees. I am trying to use [IndexEmbedded] on Employee's Company reference, so I can perform a employee query similar to: "Company.Name:IBM". When inserting the employee, this works fine. However, if I update the Company instance, the lucene index on the employee side does not get updated. The Lucene index does get updated if I update the employee in some other way in the same transaction.

I updated my NHibernate Search based on the advice from this question, but the index still does not get updated. Here's my relevant configuration:

c.SetListener(ListenerType.PostUpdate, new FullTextIndexEventListener());
c.SetListener(ListenerType.PostInsert, new FullTextIndexEventListener());
c.SetListener(ListenerType.PostDelete, new FullTextIndexEventListener());
c.SetListener(ListenerType.PostCollectionUpdate, new FullTextIndexCollectionEventListener());
c.SetListener(ListenerType.PostCollectionRecreate, new FullTextIndexCollectionEventListener());
c.SetListener(ListenerType.PostCollectionRemove, new FullTextIndexCollectionEventListener());

Any advice much appreciated.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜