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:
|
CJK types are explicitly marked to allow for custom downstream handling:
|
||||||
<IDEOGRAPHIC>, <HANGUL>, <KATAKANA>, and <HIRAGANA>.
|
<IDEOGRAPHIC>, <HANGUL>, <KATAKANA>, and <HIRAGANA>.
|
||||||
(Robert Muir, Steven Rowe)
|
(Robert Muir, Steven Rowe)
|
||||||
|
|
||||||
|
* LUCENE-2913: Add missing getters to Numeric* classes. (Uwe Schindler)
|
||||||
|
|
||||||
Optimizations
|
Optimizations
|
||||||
|
|
||||||
* LUCENE-2494: Use CompletionService in ParallelMultiSearcher instead of
|
* LUCENE-2494: Use CompletionService in ParallelMultiSearcher instead of
|
||||||
|
|
|
@ -293,6 +293,11 @@ public final class NumericTokenStream extends TokenStream {
|
||||||
return (shift < valSize);
|
return (shift < valSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Returns the precision step. */
|
||||||
|
public int getPrecisionStep() {
|
||||||
|
return precisionStep;
|
||||||
|
}
|
||||||
|
|
||||||
// members
|
// members
|
||||||
private final NumericTermAttribute numericAtt = addAttribute(NumericTermAttribute.class);
|
private final NumericTermAttribute numericAtt = addAttribute(NumericTermAttribute.class);
|
||||||
private final TypeAttribute typeAtt = addAttribute(TypeAttribute.class);
|
private final TypeAttribute typeAtt = addAttribute(TypeAttribute.class);
|
||||||
|
|
|
@ -222,6 +222,11 @@ public final class NumericField extends AbstractField {
|
||||||
return (Number) fieldsData;
|
return (Number) fieldsData;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Returns the precision step. */
|
||||||
|
public int getPrecisionStep() {
|
||||||
|
return numericTS.getPrecisionStep();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Initializes the field with the supplied <code>long</code> value.
|
* Initializes the field with the supplied <code>long</code> value.
|
||||||
* @param value the numeric 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 */
|
/** Returns the upper value of this range filter */
|
||||||
public T getMax() { return query.getMax(); }
|
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 */
|
/** Returns the upper value of this range query */
|
||||||
public T getMax() { return max; }
|
public T getMax() { return max; }
|
||||||
|
|
||||||
|
/** Returns the precision step. */
|
||||||
|
public int getPrecisionStep() { return precisionStep; }
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString(final String field) {
|
public String toString(final String field) {
|
||||||
final StringBuilder sb = new StringBuilder();
|
final StringBuilder sb = new StringBuilder();
|
||||||
|
|
Loading…
Reference in New Issue