-->
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 with super Class(Inheritance)
PostPosted: Mon Oct 20, 2008 10:48 am 
Beginner
Beginner

Joined: Mon Oct 01, 2007 8:21 am
Posts: 40
Hi,

Is it possible to index the super class property using hibernate search (like: Inheritance concept)when searching for a keyword.

Ex:
Event.java
Code:
@Entity
@Indexed
public class Event  implements java.io.Serializable {

    @Id
    @DocumentId
     private String eventId;

@IndexedEmbedded(depth = 3 , prefix="eventDescription_")
     private EventDescription eventDescription;
}




EventDescription.java

Code:
@SuppressWarnings("serial")
@Entity
@Indexed
public class EventDescription extends EventComment
{
  @Id
  @DocumentId
  private Event entityId;
}

EventComment.java


Code:

SuppressWarnings("serial")
public class EventComment implements java.io.Serializable
{

  private String eventCommentId;

  private String fieldValue;
}


I need to index the property "fieldValue" from EventComment POJO.
Is there any way to index that particular property and while searching, i should get the eventId.

Kindly help me if u hve any solutions.

Thanks,
Ambika☺


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 21, 2008 8:36 am 
Hibernate Team
Hibernate Team

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

yes it should work. Have you tried to add a @Field to the fieldValue in EventComment?

--Hardy


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:
cron
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.