mirror of https://github.com/apache/lucene.git
LUCENE-2913: Add missing getters to Numeric* classes
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1069341 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
ecb292eebb
commit
f4e977bb26
|
@ -856,7 +856,9 @@ New features
|
|||
CJK types are explicitly marked to allow for custom downstream handling:
|
||||
<IDEOGRAPHIC>, <HANGUL>, <KATAKANA>, and <HIRAGANA>.
|
||||
(Robert Muir, Steven Rowe)
|
||||
|
||||
|
||||
* LUCENE-2913: Add missing getters to Numeric* classes. (Uwe Schindler)
|
||||
|
||||
Optimizations
|
||||
|
||||
* LUCENE-2494: Use CompletionService in ParallelMultiSearcher instead of
|
||||
|
|
|
@ -293,6 +293,11 @@ public final class NumericTokenStream extends TokenStream {
|
|||
return (shift < valSize);
|
||||
}
|
||||
|
||||
/** Returns the precision step. */
|
||||
public int getPrecisionStep() {
|
||||
return precisionStep;
|
||||
}
|
||||
|
||||
// members
|
||||
private final NumericTermAttribute numericAtt = addAttribute(NumericTermAttribute.class);
|
||||
private final TypeAttribute typeAtt = addAttribute(TypeAttribute.class);
|
||||
|
|
|
@ -222,6 +222,11 @@ public final class NumericField extends AbstractField {
|
|||
return (Number) fieldsData;
|
||||
}
|
||||
|
||||
/** Returns the precision step. */
|
||||
public int getPrecisionStep() {
|
||||
return numericTS.getPrecisionStep();
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes the field with the supplied <code>long</code> value.
|
||||
* @param value the numeric value
|
||||
|
|
|
@ -179,4 +179,7 @@ public final class NumericRangeFilter<T extends Number> extends MultiTermQueryWr
|
|||
/** Returns the upper value of this range filter */
|
||||
public T getMax() { return query.getMax(); }
|
||||
|
||||
/** Returns the precision step. */
|
||||
public int getPrecisionStep() { return query.getPrecisionStep(); }
|
||||
|
||||
}
|
||||
|
|
|
@ -319,6 +319,9 @@ public final class NumericRangeQuery<T extends Number> extends MultiTermQuery {
|
|||
/** Returns the upper value of this range query */
|
||||
public T getMax() { return max; }
|
||||
|
||||
/** Returns the precision step. */
|
||||
public int getPrecisionStep() { return precisionStep; }
|
||||
|
||||
@Override
|
||||
public String toString(final String field) {
|
||||
final StringBuilder sb = new StringBuilder();
|
||||
|
|
Loading…
Reference in New Issue