The POLYGON field specifier (case sensitive) allows you to find documents whose X/Y position is within a specified polygonal shape.


coordX,coordY The coordinates for one of the vertices. Specify an X/Y pair of coordinates for each vertex of the polygon working either clockwise or anti-clockwise around the polygon. The polygon can be concave, but the edges cannot cross themselves. You can specify coordinates with decimal numbers.
X The document field containing the X coordinate.
Y The document field containing the Y coordinate.

Two fields must be specified and must be given in the order X:Y. You can specify more than one pair of fields in the form X1:Y1:X2:Y2 and so on.

Note: You can optimize the field specifier speed by restricting the coordinate fields to the NumericType property type.



This example matches all documents whose (X,Y) position is within the quadrilateral with vertices at (1,1), (-1,1), (0,-2), (1,-1).