Hibernate Search 5.7.3.Final Reference Guide
Total Page:16
File Type:pdf, Size:1020Kb
Hibernate Search 5.7.3.Final Reference Guide Emmanuel Bernard, Hardy Ferentschik, Gustavo Fernandes, Sanne Grinovero, Nabeel Ali Memon, Gunnar Morling, Yoann Rodière, Guillaume Smet 2017-10-25 Table of Contents Preface . 1 1. Getting started. 2 1.1. System Requirements . 2 1.2. Migration notes . 2 1.3. Required libraries . 2 1.4. Deploying on WildFly . 3 1.5. Configuration . 4 1.6. Indexing. 7 1.7. Searching . 8 1.8. Analyzer . 10 1.9. What’s next. 12 2. Architecture . 14 2.1. Overview . 14 2.2. Back end . 15 2.3. Reader strategy . 18 3. Configuration . 20 3.1. Enabling Hibernate Search and automatic indexing . 20 3.2. Configuring the IndexManager . 20 3.3. Directory configuration . 22 3.4. Worker configuration . 29 3.5. Reader strategy configuration . 37 3.6. Serialization . 38 3.7. Exception handling . 40 3.8. Lucene configuration . 40 3.9. Metadata API . 48 3.10. Hibernate Search as a WildFly module . 49 4. Mapping entities to the index structure . 52 4.1. Mapping an entity . 52 4.2. Boosting . 70 4.3. Analysis . 72 4.4. Bridges . 81 4.5. Conditional indexing . 94 4.6. Providing your own id . 97 4.7. Programmatic API . 98 5. Querying . 114 5.1. Building queries . 116 5.2. Retrieving the results . 137 5.3. Filters . 140 5.4. Faceting. 146 5.5. Optimizing the query process . 154 6. Manual index changes . 155 6.1. Adding instances to the index . 155 6.2. Deleting instances from the index . 155 6.3. Rebuilding the whole index . 157 7. Index Optimization. 163 7.1. Automatic optimization . 164 7.2. Manual optimization . 165 7.3. Adjusting optimization . 165 8. Monitoring . 166 8.1. JMX . 166 9. Spatial . ..