此内容没有您所选择的语言版本。
3.7. Enabling Hibernate Search and automatic indexing
3.7.1. Enabling Hibernate Search 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
Hibernate Search is enabled out of the box when using Hibernate Annotations or Hibernate EntityManager. If, for some reason you need to disable it, set
hibernate.search.autoregister_listeners to false. Note that there is no performance penalty when the listeners are enabled even though no entities are indexed.
To enable Hibernate Search in Hibernate Core (ie. if you do not use Hibernate Annotations), add the
FullTextIndexEventListener for the following six Hibernate events.
Example 3.9. Explicitly enabling Hibernate Search by configuring the FullTextIndexEventListener