Class ShapeDocValues

    • Field Detail

      • VERSION

        protected static final byte VERSION
        doc value format version; used to support bwc for any encoding changes
        See Also:
        Constant Field Values
      • data

        private final BytesRef data
        the binary doc value
      • centroid

        protected final Geometry centroid
        the centroid of the shape docvalue
      • boundingBox

        protected final Geometry boundingBox
        the bounding box of the shape docvalue
    • Constructor Detail

      • ShapeDocValues

        ShapeDocValues​(java.util.List<ShapeField.DecodedTriangle> tessellation)
        Creates a instance from a shape tessellation
        Parameters:
        tessellation - The tessellation (must not be null)
      • ShapeDocValues

        ShapeDocValues​(BytesRef binaryValue)
        Creates a ShapeDocValues instance from a given serialized value
    • Method Detail

      • binaryValue

        protected BytesRef binaryValue()
        returns the encoded doc values field as a BytesRef
      • numberOfTerms

        public int numberOfTerms()
        Returns the number of terms (tessellated triangles) for this shape
      • getEncodedMinX

        public int getEncodedMinX()
        returns the min x value for the shape's bounding box
      • getEncodedMinY

        public int getEncodedMinY()
        returns the min y value for the shape's bounding box
      • getEncodedMaxX

        public int getEncodedMaxX()
        returns the max x value for the shape's bounding box
      • getEncodedMaxY

        public int getEncodedMaxY()
        returns the max y value for the shape's bounding box
      • getEncodedCentroidX

        protected int getEncodedCentroidX()
        Retrieves the encoded x centroid location for the geometry(s)
      • getEncodedCentroidY

        protected int getEncodedCentroidY()
        Retrieves the encoded y centroid location for the geometry(s)
      • getHighestDimension

        public ShapeField.DecodedTriangle.TYPE getHighestDimension()
        Retrieves the highest dimensional type (POINT, LINE, TRIANGLE) for computing the geometry(s) centroid
      • newGeometryQuery

        public static Query newGeometryQuery​(java.lang.String field,
                                             ShapeField.QueryRelation relation,
                                             java.lang.Object... geometries)
        Creates a geometry query for shape docvalues
      • computeCentroid

        protected abstract Geometry computeCentroid()
      • computeBoundingBox

        protected abstract Geometry computeBoundingBox()
      • getCentroid

        public abstract Geometry getCentroid()
      • getBoundingBox

        public abstract Geometry getBoundingBox()
      • vLongSize

        protected static int vLongSize​(long i)
        Computes the variable Long size in bytes
      • vIntSize

        protected static int vIntSize​(int i)
        Computes the variable Integer size in bytes