use of org.opensearch.index.fielddata.LeafGeoPointFieldData in project OpenSearch by opensearch-project.
the class GeoEmptyValueSource method getValues.
@Override
public DoubleValues getValues(LeafReaderContext leaf, DoubleValues scores) {
LeafGeoPointFieldData leafData = (LeafGeoPointFieldData) fieldData.load(leaf);
final MultiGeoPointValues values = leafData.getGeoPointValues();
return new DoubleValues() {
@Override
public double doubleValue() {
return 1;
}
@Override
public boolean advanceExact(int doc) throws IOException {
return values.advanceExact(doc);
}
};
}
use of org.opensearch.index.fielddata.LeafGeoPointFieldData in project OpenSearch by opensearch-project.
the class GeoLongitudeValueSource method getValues.
@Override
public DoubleValues getValues(LeafReaderContext leaf, DoubleValues scores) {
LeafGeoPointFieldData leafData = (LeafGeoPointFieldData) fieldData.load(leaf);
final MultiGeoPointValues values = leafData.getGeoPointValues();
return new DoubleValues() {
@Override
public double doubleValue() throws IOException {
return values.nextValue().getLon();
}
@Override
public boolean advanceExact(int doc) throws IOException {
return values.advanceExact(doc);
}
};
}
use of org.opensearch.index.fielddata.LeafGeoPointFieldData in project OpenSearch by opensearch-project.
the class GeoLatitudeValueSource method getValues.
@Override
public DoubleValues getValues(LeafReaderContext leaf, DoubleValues scores) {
LeafGeoPointFieldData leafData = (LeafGeoPointFieldData) fieldData.load(leaf);
final MultiGeoPointValues values = leafData.getGeoPointValues();
return new DoubleValues() {
@Override
public double doubleValue() throws IOException {
return values.nextValue().getLat();
}
@Override
public boolean advanceExact(int doc) throws IOException {
return values.advanceExact(doc);
}
};
}
Aggregations