Hi,
I have a question on the @boost annotation.
First What I'm trying to achieve:
I have an indexed database full of products. Some products have more content and images against them than others and I want to slightly favour these products using a boost. I plan to put a float getBoost() method in my entity class which will return a higher number for these items.
As far as i understand the @boost annotation can be used in the following 2 places:
1) At class level - i believe that setting this will boost all instances of that class
2) At field level - this boosts a particular field within the class.
In my case all indexed items are the same class. I want to use boost to differentiate between individual items.
I believe this is possible because Lucene has a document.setBoost() method:
http://lucene.apache.org/java/2_3_0/api ... 28float%29So my question is: is there an annotation to set a dynamic boost value per entity instance? Is there some way to use the @boost annotation that I've missed? (Can an annotation have a dynamic value?)
If not, my next step will be to dive into the Hibernate Search interceptors to achieve what I need by manually calling document.setBoot()
Thanks for any insight you can provide,
Brendan Richards.