public class MinMaxNormalizer extends Normalizer
Example configuration:
"norm" : { "class" : "org.apache.solr.ltr.norm.MinMaxNormalizer", "params" : { "min":"0", "max":"50" } }Example normalizations:
Constructor and Description |
---|
MinMaxNormalizer() |
Modifier and Type | Method and Description |
---|---|
float |
getMax() |
float |
getMin() |
float |
normalize(float value) |
LinkedHashMap<String,Object> |
paramsToMap() |
void |
setMax(float max) |
void |
setMax(String max) |
void |
setMin(float min) |
void |
setMin(String min) |
String |
toString() |
protected void |
validate()
As part of creation of a normalizer instance, this function confirms
that the normalizer parameters are valid.
|
explain, getInstance
public float getMin()
public void setMin(float min)
public void setMin(String min)
public float getMax()
public void setMax(float max)
public void setMax(String max)
protected void validate() throws NormalizerException
Normalizer
validate
in class Normalizer
NormalizerException
- Normalizer Exceptionpublic float normalize(float value)
normalize
in class Normalizer
public LinkedHashMap<String,Object> paramsToMap()
paramsToMap
in class Normalizer
Copyright © 2000-2020 Apache Software Foundation. All Rights Reserved.