• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

hibernate search problem w/ entity inheritance

 
Theodore David Williams
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using hibernate-search 3.0.1.GA.

I am trying to create an index with entities that inherit off a base entity;

Here is the main entity I want to store the id in the index. It has many text items. The text item has two child classes on child has a varchar the other has a clob. I want to index the text for both of those child entities in the same index.


TextItem entity (this is the parent class) This class does not have any @Field annotations, the children classes have them


Here is one of the children (both look the same except for type of text field)


So I want to index the "value" field on my child table so I use the @Field. I am not sure if I need anything on the parent class (TextItem) as far as annotations, and I have the EmbeddedIndex annotation on the TextItems in the Doc entity.

I am not getting a field for value for this situation. If I have a field in the parent table (TextItem) it gets indexed, but seems like hibernate-search is not looking in my child class for Fields.

Is indexing children entity classes in hibernate-search allowed? If not is there a good work around?

Thanks in advance!
 
Theodore David Williams
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anyone w/ hibernate-search experience please speak up, I have no idea how to fix this issue. Please help
 
Theodore David Williams
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I upgraded to Hibernate Search 3.1.1.GA and I am still seeing the same problem.

Please help!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic