-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Hibernate Search and associations
PostPosted: Thu Mar 01, 2007 12:08 pm 
Beginner
Beginner

Joined: Mon Jun 06, 2005 12:10 pm
Posts: 20
I've been looking at integrating my domain model with Lucene to make it more easily searchable. Imagine my surprise and delight when I found out about Hibernate Search, since I already use Hibernate from all my persistence.

The only thing I have a question about is how Hibernate Search handles associations. For instance, if I wanted to map a Person and Company object, and a person can work for multiple companies (so I have a many-to-many relationship), how would the Lucene integration handle that association? Would I be able to search for all people who have "Jr" in their name and work at companies with "Inc." in the company name using a Lucene query? Would I have to create a custom FieldBridge to accomplish such a thing?

Thanks,
Rich


Top
 Profile  
 
 Post subject:
PostPosted: Thu Mar 01, 2007 3:24 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
Hibernate Search is not aware of associations today, so such "join" (very relational operation) is not doable out-of-the-box.
The FieldBridge is a possible answer. Give the custom field bridge a try, and we 'll try to come up with a standard version of what you've done.
An alternative solution is the notion of @SearchEmbeddable (which is probably more promising)

PS let's move this thread on http://forum.hibernate.org/viewforum.php?f=9, which is where it belongs to

_________________
Emmanuel


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.