[hibernate-dev] [HSEARCH] Proposal to change the default value of Field#norms()

Sanne Grinovero sanne at hibernate.org
Tue May 8 06:27:44 EDT 2012

On 8 May 2012 10:43, Guillaume Smet <guillaume.smet at gmail.com> wrote:
> Hi,
> On Tue, May 8, 2012 at 10:20 AM, Hardy Ferentschik <hardy at hibernate.org> wrote:
>>> Sanne also suggested an alternative solution. We may introduce a new global
>>> option which would define the default value for Field#norms(). The default
>>> value of this option would be obviously YES. Users like me could change it
>>> to NO if needed. I personally think we have already enough options. But
>>> this solution would be OK for me.
>> -1 I agree that we already have enough options and the proposed changed will
>> just introduce ambiguities.
> I kinda agree with Hardy. It's difficult to find a good (and
> understandable by a developer who isn't a Lucene expert) explanation
> of what norms are, how they are useful and when you should enable
> them.
> Having the most user friendly configuration and allowing advanced
> users to set it per field as it is now is IMHO the best option.

I agree as well, when proposing it in the chat I meant it as "the only
option I see, but I don't like the added complexity". Hardy expressed
it better: ambiguities. Very evil stuff.
It's more like it's the only solution I see to change it without
breaking current behaviour for potential other users relying on it. It
is of course a great question, if it makes sense to rely on it for
some types?

Proposal for next versions: allow @Stereotype - like user annotations?
We would let the user define custom annotations to stack/combine
multiple framework annotations, possibly centralizing what the
"default" is for your app and reduce the amount of code people have to
pile on each getter.
I think it's reasonable to think that many user types are reused
multiple times in a real world application having many entities, and
likely want them to be indexed all in the same way.

As an added benefit this would resolve the concerns raised by some
users about having their domain model need to "depend" on our
annotations at compile time.


> --
> Guillaume
> _______________________________________________
> 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