The DISTCARTESIAN field specifier allows you to find documents whose X/Y position is within a specified distance from a specified point.


coordX The specified x coordinate.
coordY The specified y coordinate.
dist The distance in kilometers from the specified x/y coordinates.
X The document field containing the X coordinate.
Y The document field containing the Y coordinate.

You must specify two fields, in the order X:Y.

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 a distance of 5 units of the point (10,11).