• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

hibernate search problem w/ entity inheritance

 
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I upgraded to Hibernate Search 3.1.1.GA and I am still seeing the same problem.

Please help!
 
All of life is a contant education - Eleanor Roosevelt. Tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic