• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Hibernate Search without Annontation

 
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can we implement Hibernate Search without using annotation ?
or it is compulsory ?
 
author
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Today the only metadata model supported is annotations. It is possible to write a XML descriptor and the underlying mechanics is available but nobody had the time or willingness to go and write this XML descriptor and parser.
If you are interested to contribute, have a look at http://www.hibernate.org/443.html

Now the question is more, what do you have against annotations?
 
Emmanuel Bernard
author
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
BTW, you can still use hbm.xml mappings and use annotations for Hibernate Search metadata. chapter 2 of Hibernate Search in Action gives such an example
 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
>> Now the question is more, what do you have against annotations?

First of all ... I am a huge fan of annotations and use them whenever possible.

That said, annotations have a huge downside -- configuration via annotation requires rebuilding the code should something change. Properly written XML configuration should only require a restart of the application to take effect.
 
Ganesh Bhambure
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Now the question is more, what do you have against annotations?



Actually I am not against annotations.
But Thought that Hibernate Search required hibernate annotation compulsory.

But As Emmanuel posted :

you can still use hbm.xml mappings and use annotations for Hibernate Search metadata.



It clears my query.

Thanks

- Ganesh
[ December 11, 2008: Message edited by: Ganesh Bhambure ]
 
Emmanuel Bernard
author
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

That said, annotations have a huge downside -- configuration via annotation requires rebuilding the code should something change. Properly written XML configuration should only require a restart of the application to take effect.



I don't think this argument stands for Hibernate Search
When you change an indexing mapping (say a property or an entity), in 99% of the case you will change some code to build a better query or a different use case. So you will recompile.
 
Ganesh Bhambure
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

When you change an indexing mapping (say a property or an entity), in 99% of the case you will change some code to build a better query or a different use case. So you will recompile.



Yes, agree with Emmanuel
 
Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic