Class NumericConfig
- java.lang.Object
-
- org.apache.lucene.queryParser.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, org.apache.lucene.document.NumericField.DataType 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 valuesorg.apache.lucene.document.NumericField.DataTypegetType()Returns the numeric type used to index the numeric valuesvoidsetNumberFormat(NumberFormat format)voidsetPrecisionStep(int precisionStep)Sets the precision used to index the numeric valuesvoidsetType(org.apache.lucene.document.NumericField.DataType type)Sets the numeric type used to index the numeric values
-
-
-
Constructor Detail
-
NumericConfig
public NumericConfig(int precisionStep, NumberFormat format, org.apache.lucene.document.NumericField.DataType 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.NumericField.DataType)
-
-
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 org.apache.lucene.document.NumericField.DataType 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(org.apache.lucene.document.NumericField.DataType 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
-
-