-->
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: Mapping complex object hierarchy
PostPosted: Wed Dec 02, 2009 8:28 am 
Regular
Regular

Joined: Thu Nov 26, 2009 8:45 am
Posts: 78
Hi there,

i'm new to Hibernate Search and try to embedd it into a project which had a lot of Objects that needs to be indexed.
There are objects like:

object A with Attributes:
- String1
- String2
- int1
- int2
- object B
- ...

Object B itselfs contains an attribute which is type of object C and so on...can i map this only with the @IndexEmbedded-Tag or do i need to implement my own bridges for each object? I read the "Hibernate Search in Action" book, chapters 3 and 4 in detail to solve this, but i really dont get it here. Perhaps somebody could tell me the difference of the @IndexEmbedded-Tag and the bridge first?

When i (in the example above) tag the object B with @IndexEmbedded and inside the object tag all needed attributes with @Field (for types String, int, ... ) and @IndexEmbedded for attributes of object C and go on like this recursivly through my hierarchy, it wont work. (edit: in detail, i always get: "org.hibernate.search.SearchException: Unable to guess FieldBridge for objectBla" when tagging all the attributes/classes)

Any help appreciated.


Top
 Profile  
 
 Post subject: Re: Mapping complex object hierarchy
PostPosted: Wed Dec 02, 2009 8:38 am 
Hibernate Team
Hibernate Team

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

using nested @IndexedEmbedded should work. Depending on the version of Hibernate Search you are using you might run into HSEARCH-391 which was causing nested indexing to fail. The bug is fixed in HSearch 3.2.0 Beta1, but also backported to 3.1.x (however you would have to build your own version from the 3.1.x branch).
I hope this helps.

--Hardy


Top
 Profile  
 
 Post subject: Re: Mapping complex object hierarchy
PostPosted: Wed Dec 02, 2009 8:59 am 
Regular
Regular

Joined: Thu Nov 26, 2009 8:45 am
Posts: 78
I had to use Hibernate Search 3.0.1., cause we using Hibernate core 3.2.6. and we arent able to change it at the moment.
Thx for your reply, but in that case that might be not a solution to my problem


Top
 Profile  
 
 Post subject: Re: Mapping complex object hierarchy
PostPosted: Wed Dec 02, 2009 10:11 am 
Regular
Regular

Joined: Thu Nov 26, 2009 8:45 am
Posts: 78
Ok, forget it, i had some errors in the annots on my side. Indexes now. (without bridges)


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.