-->
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.  [ 4 posts ] 
Author Message
 Post subject: Hibernate search over many-to-many relationship
PostPosted: Fri Mar 28, 2008 1:05 pm 
Newbie

Joined: Fri Mar 28, 2008 12:37 pm
Posts: 3
I have got Hibernate Search up and running within a Seam application. All is working well (nice job on the Hibernate Search capabilty BTW) but I would like to understand if the following is possible.

Let's say I have an entity called Contact and an entity called Address. There is a further entity PersonAddressLink providing a many to many bridge between Person and Address.

Is it possible to index these entities such that I could find contacts (the root entity) where the contact's linked address records have a match for the search query? I know I could find matching addresses then link to the contacts, but I want to combine the matching across address and contact
e.g.
+address.postcode:AB12XY +name:bob

Thanks
Willy


Top
 Profile  
 
 Post subject:
PostPosted: Sat Mar 29, 2008 10:37 am 
Hibernate Team
Hibernate Team

Joined: Thu Apr 05, 2007 5:52 am
Posts: 1689
Location: Sweden
Hi Willy,

I think that @IndexedEmbedded should work fine on a many to many relationship. See also http://forum.hibernate.org/viewtopic.php?p=2355390. The underlying issue HSEARCH-56 is also fixed by now.

Admittedly, the online documentation for @IndexedEmbedded says differently:
Quote:
Any @*ToOne and @Embedded attribute can be annotated with @IndexedEmbedded.
. Probably just needs updating. Give it a go and let us know if it works.

Good luck.

--Hardy


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 07, 2008 5:58 pm 
Hibernate Team
Hibernate Team

Joined: Sun Sep 14, 2003 3:54 am
Posts: 7256
Location: Paris, France
can you open a jira issue about the doc improvement.

_________________
Emmanuel


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 08, 2008 5:44 am 
Hibernate Team
Hibernate Team

Joined: Thu Apr 05, 2007 5:52 am
Posts: 1689
Location: Sweden
New Jira issue: http://opensource.atlassian.com/project ... SEARCH-180


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 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.