Hi all,
I've setup a project with Hibernate Search 3.4 containing the following class:
Code:
@Entity
@Indexed
@AnalyzerDefs( {....})
@DynamicBoost(impl=ProductBooster.class)
public class ProductResult {.....
ProductBooster looks like this:
Code:
public class ProductBooster implements BoostStrategy {
public ProductBooster() {
}
public float defineBoost(Object in) {
ProductResult pr = (ProductResult) in;
if (pr.isSpecial()) {
return 10f;
} else {
return 1f;
}
}
}
My problem is, that defineBoost is never invoked (I put a breakpoint on it) and so the lucene index does not reflect the boost at all.
Has DynamicBoost to be enabled somewhere? Or do you have any other hint what goes wrong here?
Thanks,
Titus