Class NumericConfig
- java.lang.Object
-
- org.apache.lucene.queryparser.flexible.standard.config.NumericConfig
-
public class NumericConfig extends Object
This class holds the configuration used to parse numeric queries and createNumericRangeQuerys.- See Also:
NumericRangeQuery,NumberFormat
-
-
Constructor Summary
Constructors Constructor Description NumericConfig(int precisionStep, NumberFormat format, FieldType.NumericType type)Constructs aNumericConfigobject.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)NumberFormatgetNumberFormat()intgetPrecisionStep()Returns the precision used to index the numeric valuesFieldType.NumericTypegetType()Returns the numeric type used to index the numeric valuesvoidsetNumberFormat(NumberFormat format)voidsetPrecisionStep(int precisionStep)Sets the precision used to index the numeric valuesvoidsetType(FieldType.NumericType type)Sets the numeric type used to index the numeric values
-
-
-
Constructor Detail
-
NumericConfig
public NumericConfig(int precisionStep, NumberFormat format, FieldType.NumericType type)Constructs aNumericConfigobject.- Parameters:
precisionStep- the precision used to index the numeric valuesformat- theNumberFormatused to parse aStringtoNumbertype- the numeric type used to index the numeric values- See Also:
setPrecisionStep(int),setNumberFormat(NumberFormat),setType(org.apache.lucene.document.FieldType.NumericType)
-
-
Method Detail
-
getPrecisionStep
public int getPrecisionStep()
Returns the precision used to index the numeric values- Returns:
- the precision used to index the numeric values
- See Also:
NumericRangeQuery.getPrecisionStep()
-
setPrecisionStep
public void setPrecisionStep(int precisionStep)
Sets the precision used to index the numeric values- Parameters:
precisionStep- the precision used to index the numeric values- See Also:
NumericRangeQuery.getPrecisionStep()
-
getNumberFormat
public NumberFormat getNumberFormat()
- Returns:
- the
NumberFormatused to parse aStringtoNumber
-
getType
public FieldType.NumericType getType()
Returns the numeric type used to index the numeric values- Returns:
- the numeric type used to index the numeric values
-
setType
public void setType(FieldType.NumericType type)
Sets the numeric type used to index the numeric values- Parameters:
type- the numeric type used to index the numeric values
-
setNumberFormat
public void setNumberFormat(NumberFormat format)
- Parameters:
format- theNumberFormatused to parse aStringtoNumber, cannot benull
-
-