Summary

In this chapter, we expanded our knowledge of how to map classes for searching. We can now use Hibernate Search to map entities and other classes to Lucene, regardless of how Hibernate ORM maps them to the database. If we ever need to map classes to Lucene without adding annotations, we can use a programmatic mapping API to handle this at runtime.

We have now seen how to manage Hibernate Search across associated entities, as well as embedded objects whose lifecycle depend on their containing entity. In both cases, we covered some obscure quirks that can trip up developers. Finally, we learned how to control which fields of an associated or embedded class are indexed, depending on which entity contains them.

In the next chapter, we will use these mappings in a variety of search query types, and explore some important features common to all of them.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset