Chapter 5. Configuration
- 5.1. Hibernate Search and Automatic Indexing
- 5.2. Configuring the IndexManager
- 5.3. Directory Configuration
- 5.4. Worker Configuration
- 5.5. Tuning Lucene Indexing
- 5.6. LockFactory Configuration
- 5.7. Exception Handling Configuration
- 5.8. Index Format Compatibility
- 5.9. Hibernate Search as Red Hat JBoss EAP Module
5.1. Hibernate Search and Automatic Indexing
5.1.1. Enable and Disable Hibernate Search
Hibernate Search is enabled by default when detected on the classpath by Hibernate Core. There is no performance penalty when the listeners are enabled but no entities are annotated as indexed. Disable Hibernate Search as follows:
hibernate.search.autoregister_listeners = false
5.1.2. Automatic Indexing
By default, when an object is inserted, updated, or deleted, Hibernate Search updates the corresponding Lucene index. Disable automatic indexing if either the index is read-only or if index updates are done in batches.
Use the following to disable event based indexing
hibernate.search.indexing_strategy = manual
The JMS back end provides both the lightweight event-based system that tracks changes in the system and the indexing process done by a separate process or machine.