private float getBoost(XClass element) { float boost = 1.0f; if ( element == null ) { return boost; } Boost boostAnnotation = element.getAnnotation( Boost.class ); if ( boostAnnotation != null ) { boost = boostAnnotation.value(); } return boost; }
private float getBoost(XClass element) { float boost = 1.0f; if ( element == null ) { return boost; } Boost boostAnnotation = element.getAnnotation( Boost.class ); if ( boostAnnotation != null ) { boost = boostAnnotation.value(); } return boost; }
public static Float getBoost(XProperty member, Annotation fieldAnn) { float computedBoost = 1.0f; Boost boostAnn = member.getAnnotation( Boost.class ); if ( boostAnn != null ) { computedBoost = boostAnn.value(); } if ( fieldAnn != null ) { float boost; if ( fieldAnn instanceof org.hibernate.search.annotations.Field ) { boost = ( (org.hibernate.search.annotations.Field) fieldAnn ).boost().value(); } else if ( fieldAnn instanceof Spatial ) { boost = ( (Spatial) fieldAnn ).boost().value(); } else { raiseAssertionOnIncorrectAnnotation( fieldAnn ); boost = 0; //never reached } computedBoost *= boost; } return computedBoost; }
public static Float getBoost(XProperty member, Annotation fieldAnn) { float computedBoost = 1.0f; Boost boostAnn = member.getAnnotation( Boost.class ); if ( boostAnn != null ) { computedBoost = boostAnn.value(); } if ( fieldAnn != null ) { float boost; if ( fieldAnn instanceof org.hibernate.search.annotations.Field ) { boost = ( (org.hibernate.search.annotations.Field) fieldAnn ).boost().value(); } else if ( fieldAnn instanceof Spatial ) { boost = ( (Spatial) fieldAnn ).boost().value(); } else { raiseAssertionOnIncorrectAnnotation( fieldAnn ); boost = 0; //never reached } computedBoost *= boost; } return computedBoost; }
.boost( spatialAnnotation.boost().value() ) .fieldBridge( spatialBridge ) .spatial();
.boost( spatialAnnotation.boost().value() ) .fieldBridge( spatialBridge ) .spatial();
fieldPath, store, index, termVector .boost( classBridgeAnnotation.boost().value() ) .fieldBridge( fieldBridge );
fieldPath, store, index, termVector .boost( classBridgeAnnotation.boost().value() ) .fieldBridge( fieldBridge );