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 createNumericRangeQuery
s.- See Also:
NumericRangeQuery
,NumberFormat
-
-
Constructor Summary
Constructors Constructor Description NumericConfig(int precisionStep, NumberFormat format, org.apache.lucene.document.NumericField.DataType type)
Constructs aNumericConfig
object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
NumberFormat
getNumberFormat()
int
getPrecisionStep()
Returns the precision used to index the numeric valuesorg.apache.lucene.document.NumericField.DataType
getType()
Returns the numeric type used to index the numeric valuesvoid
setNumberFormat(NumberFormat format)
void
setPrecisionStep(int precisionStep)
Sets the precision used to index the numeric valuesvoid
setType(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 aNumericConfig
object.- Parameters:
precisionStep
- the precision used to index the numeric valuesformat
- theNumberFormat
used to parse aString
toNumber
type
- 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
NumberFormat
used to parse aString
toNumber
-
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
- theNumberFormat
used to parse aString
toNumber
, cannot benull
-
-