|
|
|
when indexing a collection of short value using the {{ @IndexedEmbedded }} + {{ @NumericField }} + {{ @Field }} annotation combinaison combination , it will return the expected {{ NumericIterableBridge }} .
though when indexing a short value using the {{ @NumericField }} + {{ @Field }} annotation combinaison combination no bridge is associated with.
here's my understanding of the issue :
when guessing type in {{ org.hibernate.search.bridge.impl.BridgeFactory::guessNumericFieldBridge }} , it will return null, and then throw an {code} throw new SearchException( "Unable to guess FieldBridge for " + member.getName() ); {code} since there's no {{ ShortNumericBridge }} type exists.
i guess the correct implementation of the non-existing {{ ShortNumericBridge }} would be : {code} public class ShortNumericFieldBridge extends NumericFieldBridge {
public Object get(String name, Document document) { return Short.valueOf(document.getFieldable(name).stringValue()); } } {code} then add we would need to do is add the new implementation into the static numericField map.
seem a nice addition to me, or is there something i missed somewhere ?
thanks
|
|
|
|