com.groupbyinc.api.model.NumericBoost Maven / Gradle / Ivy
package com.groupbyinc.api.model;
/**
*
* A numeric boost specifies a field to match in a search and a weight
* to apply to that field. The position of records in the page of results
* is adjusted by the value of the field multiplied by the weight.
*
*/
public class NumericBoost {
public static final double DEFAULT_STRENGTH = 1;
private String name;
private boolean inverted;
private double strength;
public NumericBoost() {
strength = DEFAULT_STRENGTH;
}
/**
* @return The name of the field to boost on
*/
public String getName() {
return name;
}
/**
*
* Set the name of the field to boost on
*
*
* @param name The name of the field to boost on
* @return
*/
public com.groupbyinc.api.model.NumericBoost setName(String name) {
this.name = name;
return this;
}
/**
* @return Whether the numeric boost is inverted
*/
public boolean isInverted() {
return inverted;
}
/**
*
* Set whether the numeric boost is inverted
*
*
* @param inverted if true, the numeric boost will be inverted
* @return
*/
public com.groupbyinc.api.model.NumericBoost setInverted(boolean inverted) {
this.inverted = inverted;
return this;
}
/**
* @return The weight of the numeric boost
*/
public double getStrength() {
return strength;
}
/**
*
* Set the weight of the numeric boost
*
*
* @param strength The weight of the numeric boost
* @return
*/
public com.groupbyinc.api.model.NumericBoost setStrength(double strength) {
this.strength = strength;
return this;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy