Package org.elasticsearch.index.fielddata

Examples of org.elasticsearch.index.fielddata.MultiGeoPointValues


                    }
                };
                return FieldData.singleton(values, DocValues.docsWithValue(singleOrds, maxDoc));
            } else {
                final GeoPoint point = new GeoPoint();
                return new MultiGeoPointValues() {

                    @Override
                    public GeoPoint valueAt(int index) {
                        final long ord = ords.ordAt(index);
                        point.reset(lat.get(ord), lon.get(ord));
View Full Code Here


                this.origin = origin;
            }

            @Override
            public void setNextReader(LeafReaderContext reader) {
                final MultiGeoPointValues geoValues = source.geoPointValues();
                final FixedSourceDistance distance = distanceType.fixedSourceDistance(origin.getLat(), origin.getLon(), unit);
                distanceValues = GeoDistance.distanceValues(geoValues, distance);
            }
View Full Code Here

        // no-op
    }

    @Override
    public MultiGeoPointValues getGeoPointValues() {
        return new MultiGeoPointValues() {

            int count;
            GeoPoint[] points = new GeoPoint[0];

            @Override
View Full Code Here

                    }
                };
                return FieldData.singleton(values, DocValues.docsWithValue(singleOrds, maxDoc));
            } else {
                final GeoPoint point = new GeoPoint();
                return new MultiGeoPointValues() {

                    @Override
                    public GeoPoint valueAt(int index) {
                        final long ord = ords.ordAt(index);
                        encoding.decode(lat.get(ord), lon.get(ord), point);
View Full Code Here

            boundingBoxDocSet = boundingBoxFilter.getDocIdSet(context, null);
            if (DocIdSets.isEmpty(boundingBoxDocSet)) {
                return null;
            }
        }
        MultiGeoPointValues values = indexFieldData.load(context).getGeoPointValues();
        GeoDistanceRangeDocSet distDocSet = new GeoDistanceRangeDocSet(context.reader().maxDoc(), acceptedDocs, values, fixedSourceDistance, distanceBoundingCheck, inclusiveLowerPoint, inclusiveUpperPoint);
        if (boundingBoxDocSet == null) {
            return distDocSet;
        } else {
            return new AndDocIdSet(new DocIdSet[]{boundingBoxDocSet, distDocSet});
View Full Code Here

        return indexFieldData.getFieldNames().indexName();
    }

    @Override
    public DocIdSet getDocIdSet(LeafReaderContext context, Bits acceptedDocs) throws IOException {
        final MultiGeoPointValues values = indexFieldData.load(context).getGeoPointValues();
        return new GeoPolygonDocIdSet(context.reader().maxDoc(), acceptedDocs, values, points);
    }
View Full Code Here

            boundingBoxDocSet = boundingBoxFilter.getDocIdSet(context, null);
            if (DocIdSets.isEmpty(boundingBoxDocSet)) {
                return null;
            }
        }
        final MultiGeoPointValues values = indexFieldData.load(context).getGeoPointValues();
        GeoDistanceDocSet distDocSet = new GeoDistanceDocSet(context.reader().maxDoc(), acceptedDocs, values, fixedSourceDistance, distanceBoundingCheck, distance);
        if (boundingBoxDocSet == null) {
            return distDocSet;
        } else {
            return new AndDocIdSet(new DocIdSet[]{boundingBoxDocSet, distDocSet});
View Full Code Here

        return indexFieldData.getFieldNames().indexName();
    }

    @Override
    public DocIdSet getDocIdSet(LeafReaderContext context, Bits acceptedDocs) throws IOException {
        final MultiGeoPointValues values = indexFieldData.load(context).getGeoPointValues();

        //checks to see if bounding box crosses 180 degrees
        if (topLeft.lon() > bottomRight.lon()) {
            return new Meridian180GeoBoundingBoxDocSet(context.reader().maxDoc(), acceptedDocs, values, topLeft, bottomRight);
        } else {
View Full Code Here

TOP

Related Classes of org.elasticsearch.index.fielddata.MultiGeoPointValues

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.