Hardy Ferentschik
Tue, 22 Apr 2008 01:21:58 -0700
A new proposal: I got inspired by the "3VL" considerations described in Emmanuel's link to wikipedia, and think backwards compatibility is nice: add a "@IndexNullMarker" on the property, this will add an additional Field to the index for null values:
Hmm, interesting idea. It addresses one of the biggest concerns I havewith this null marker thing, namely ambiguities. But would querying look like in this case. Wouldn't it become harder? Whenever you want to use this feature you would have to combine two fields - foo and fooIsFalse - within a boolean query to get the expected
result. Something like this: "foo:bar OR fooIsNull:true".Of course it would also mean that the index size grows since we are adding more fields.
And the bigger the index, ...
I think it should stay an optional and explicit feature. Adding one addtional field for each indexed properties does not seem justified. Especially, since we agree that the best solution would be to re-think your design and come up with a proper non-null default. So by offering this feature we might end up encouraging peopleThe Field and StringBridge API would remain as-is; If you prefer not to add an additional @IndexNullMarker could be dropped if you think adding this field is acceptable for all fields.
to stick with there less optimal design ;-) Cheers, Hardy _______________________________________________ hibernate-dev mailing list hibernate-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/hibernate-dev