@Override public long get(int docID) { return (long) values.get(docID); }
@Override public long get(int docID) { return (long) values.get(docID); }
@Override public long get(int docID) { return Double.doubleToRawLongBits(NumericDoubleValues.this.get(docID)); } };
@Override public long get(int docID) { return Double.doubleToRawLongBits(NumericDoubleValues.this.get(docID)); } };
@Override public long get(int docID) { return Float.floatToRawIntBits((float)NumericDoubleValues.this.get(docID)); } };
@Override public long get(int docID) { return Float.floatToRawIntBits((float)NumericDoubleValues.this.get(docID)); } };
@Override public void setDocument(int doc) { value = in.get(doc); if (docsWithField != null && value == 0 && docsWithField.get(doc) == false) { count = 0; } else { count = 1; } }
@Override public void setDocument(int doc) { value = in.get(doc); if (docsWithField != null && value == 0 && docsWithField.get(doc) == false) { count = 0; } else { count = 1; } }
@Override public double get(int docID) { final double value = singleton.get(docID); if (value == 0 && docsWithField.get(docID) == false) { return missingValue; } return value; } };
@Override public double get(int docID) { final double value = singleton.get(docID); if (value == 0 && docsWithField.get(docID) == false) { return missingValue; } return value; } };
@Override public double score(int docId, float subQueryScore) { return func.evaluate(distance.get(docId), scale); }
@Override public long get(int docID) { return NumericUtils.doubleToSortableLong(values.get(docID)); }
@Override public double score(int docId, float subQueryScore) { return func.evaluate(distance.get(docId), scale); }
@Override public long get(int docID) { return NumericUtils.doubleToSortableLong(values.get(docID)); }
@Override public void collect(int doc, long bucket) throws IOException { if (bucket >= mins.size()) { long from = mins.size(); mins = bigArrays.grow(mins, bucket + 1); mins.fill(from, mins.size(), Double.POSITIVE_INFINITY); } final double value = values.get(doc); double min = mins.get(bucket); min = Math.min(min, value); mins.set(bucket, min); }
@Override public void collect(int doc, long bucket) throws IOException { if (bucket >= maxes.size()) { long from = maxes.size(); maxes = bigArrays.grow(maxes, bucket + 1); maxes.fill(from, maxes.size(), Double.NEGATIVE_INFINITY); } final double value = values.get(doc); double max = maxes.get(bucket); max = Math.max(max, value); maxes.set(bucket, max); }
@Override public void collect(int doc, long bucket) throws IOException { if (bucket >= mins.size()) { long from = mins.size(); mins = bigArrays.grow(mins, bucket + 1); mins.fill(from, mins.size(), Double.POSITIVE_INFINITY); } final double value = values.get(doc); double min = mins.get(bucket); min = Math.min(min, value); mins.set(bucket, min); }
@Override public void collect(int doc, long bucket) throws IOException { if (bucket >= maxes.size()) { long from = maxes.size(); maxes = bigArrays.grow(maxes, bucket + 1); maxes.fill(from, maxes.size(), Double.NEGATIVE_INFINITY); } final double value = values.get(doc); double max = maxes.get(bucket); max = Math.max(max, value); maxes.set(bucket, max); }
@Override public Explanation explainScore(int docId, Explanation subQueryScore) throws IOException { return Explanation.match( CombineFunction.toFloat(score(docId, subQueryScore.getValue())), "Function for field " + getFieldName() + ":", func.explainFunction(getDistanceString(ctx, docId), distance.get(docId), scale)); } };
@Override public Explanation explainScore(int docId, Explanation subQueryScore) throws IOException { return Explanation.match( CombineFunction.toFloat(score(docId, subQueryScore.getValue())), "Function for field " + getFieldName() + ":", func.explainFunction(getDistanceString(ctx, docId), distance.get(docId), scale)); } };