concept association in category hibernate

appears as: ssociations, ssociation, association, associations, n association, The association
Hibernate Search in Action

This is an excerpt from Manning's book Hibernate Search in Action.

4.2.1. Querying on associations and full-text searching

Deep inside both the relational model and the object model lies the idea of relationship (or association) between entities. Both models allow you to navigate from one entity to an associated entity. Because associations are a native part of the model, it’s possible to express queries that apply restrictions on associated objects. We’ll call such queries correlated queries.

Since a Lucene query takes only a single document into consideration to evaluate its relevance and has no notion of a document join or association, contrary to the object and relational models, Hibernate Search indexes the object graph into a single document. In figure 4.3, you can see that when the item entity is indexed, its associated director and actors are indexed in the same document.

Figure 4.3. Hibernate Search denormalizes associations to make them queryable. The information in an object graph is rendered in a flat form in a single Lucene document.

Each of the association’s entity properties is indexed in the association’s namespace. In our example, the director’s name is indexed in director.name, which is exactly how we’d express a navigation to the director’s name of a given item in an expression language or in HQL.