NHibernate.Search索引重建

问题描述:

如何使用NHibernate.Search重建Lucene.NET索引?

How can i rebuild Lucene.NET Index using NHibernate.Search ?

谢谢.

IFullTextSearchSession中有一个Index方法,该方法将强制实体并为其建立索引.因此,您只需要检索所有对象,然后在它们上调用索引.

There is an Index method off of the IFullTextSearchSession that will force and index of an entity. So you just need to retrieve all of the objects and then call index on them.