Ah yes thanks I found it. It's only being used by the String2FieldBridgeAdaptor ? So boosting on other types is ignored?
Yes embedding the functonality in existing @Boost was something we had proposed on mailing list, but it probably didn't got much attention. What I recall is something like this: @Boost(float staticBoost, BoostStrategy dynamicStrategy) and have a default implementation for dynamicStrategy to say "return 1". should also be backwards compatible that way. WDYT? 2009/12/4 Emmanuel Bernard <emman...@hibernate.org>: > The altered boost is passed to the bridge as one of the LuceneOptions. > > On 4 déc. 09, at 16:36, Sanne Grinovero wrote: > >> Hardy, >> I don't think setting @DynamicBoost on a field will affect the score >> of that field, but rather receive that object as a parameter for the >> function and affect the whole document scoring. >> That's about the current implementation; I'm still unsure that's >> possible to do differently. >> >> 2009/12/4 Hardy Ferentschik <hibern...@ferentschik.de>: >>> >>> Hi, >>> >>> I am not quite sure I follow. Why fieldname? And do you mean Lucene >>> Document field name or >>> a entity field name? >>> >>> I think originally we discussed defineBoost(String fieldName, Object >>> value), but decided that >>> the fieldName parameter was not needed. >>> >>> You can place the @DynamicBoost annotation on class or field level. On >>> class level you define a >>> dynamic boost for the whole entity and on field level just for this >>> field. >>> Do you want to be able >>> to place a @DynamicBoost on class level and call for each indexed field >>> defineBoost(String fieldName, Object value), >>> where fieldName would be the current index field name and value the >>> indexed entity? >>> >>> One thing we have not done though is to add @DynamicBoost to @Field. >>> Right >>> now you can only >>> specify @DynamicBoost directly on a field and the dynamic boost will >>> apply >>> to all @Field annotations defined >>> on this field. >>> >>> --Hardy >>> >>> On Fri, 04 Dec 2009 09:44:30 -0300, Emmanuel Bernard >>> <emman...@hibernate.org> wrote: >>> >>>> I think the BoostStrategy interface is not right. >>>> You can't adjust the boost strategy according to the field name and I >>>> think that's important (assuming dynamic boosting is used). >>>> >>>> We probably should rework it to do >>>> >>>> interface BoostStrategy { >>>> void defineBoost(String fieldName, Object value); >>>> } >>>> >>>> WDYT? >>>> _______________________________________________ >>>> hibernate-dev mailing list >>>> hibernate-dev@lists.jboss.org >>>> https://lists.jboss.org/mailman/listinfo/hibernate-dev >>> >>> _______________________________________________ >>> hibernate-dev mailing list >>> hibernate-dev@lists.jboss.org >>> https://lists.jboss.org/mailman/listinfo/hibernate-dev >>> > > _______________________________________________ hibernate-dev mailing list hibernate-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/hibernate-dev