Class NumericConfig
- java.lang.Object
-
- org.apache.lucene.queryparser.flexible.standard.config.NumericConfig
-
public class NumericConfig extends java.lang.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, java.text.NumberFormat format, FieldType.NumericType type)
Constructs aNumericConfig
object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
java.text.NumberFormat
getNumberFormat()
Returns theNumberFormat
used to parse aString
toNumber
int
getPrecisionStep()
Returns the precision used to index the numeric valuesFieldType.NumericType
getType()
Returns the numeric type used to index the numeric valuesvoid
setNumberFormat(java.text.NumberFormat format)
Sets theNumberFormat
used to parse aString
toNumber
void
setPrecisionStep(int precisionStep)
Sets the precision used to index the numeric valuesvoid
setType(FieldType.NumericType type)
Sets the numeric type used to index the numeric values
-
-
-
Constructor Detail
-
NumericConfig
public NumericConfig(int precisionStep, java.text.NumberFormat format, FieldType.NumericType 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.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 java.text.NumberFormat getNumberFormat()
Returns theNumberFormat
used to parse aString
toNumber
- Returns:
- the
NumberFormat
used to parse aString
toNumber
-
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(java.text.NumberFormat format)
Sets theNumberFormat
used to parse aString
toNumber
- Parameters:
format
- theNumberFormat
used to parse aString
toNumber
, cannot benull
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
-