Chapter 2. Getting started with Hibernate Search
This chapter covers
- What is Hibernate Search?
- How to set up and configure Hibernate Search
- An introduction to mapping your domain model
- An introduction to indexing your data
- An introduction to doing full-text queries
- How to use Luke
In the chapter 1, we discussed difficulties of integrating a full-text search engine such as Apache Lucene into a Java application centered on a domain model and using Hibernate or Java Persistence to persist data. More specifically, we saw three mismatches:
- Structural mismatch— How to convert the object domain into the text-only index; how to deal with relations between objects in the index.
- Synchronization mismatch— How to keep the database and the index synchronized all the time.
- Retrieval mismatch— How to get a seamless integration between the domain model-centric data-retrieval methods and full-text search.
Hibernate Search leverages the Hibernate ORM and Apache Lucene (full-text search engine) technologies to address these mismatches. This chapter will give you an overview of Hibernate Search: how to use it, how to express full-text queries, and how it fits into the Hibernate programmatic model.