[hibernate-dev] BoostStrategy issues

Sanne Grinovero sanne.grinovero at gmail.com
Fri Dec 4 10:36:03 EST 2009


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 <hibernate at 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
> <emmanuel at 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 at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/hibernate-dev
>
> _______________________________________________
> hibernate-dev mailing list
> hibernate-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/hibernate-dev
>




More information about the hibernate-dev mailing list