geospatial - mongodb geoNear vs near -
It seems that two similar functions work for geological questions - Geographical command offers alternatives to the operator of approximately $. In addition to its $$ functionality, Groundbreaking offers additional diagnostic information. It seems that a superset of The efficiency must be the same for either. The main limit of I recommend that users do not stick to near $ and < Code> $ geoNear . According to the Mongo Docks
near geoNear
provides functionality. For example,
pass returns only the nearest 100 documents, while
geoNear lets you specify the maximum
instead of
pass geoNear Is there a reason to use ? Is a more efficient one than the other?
geoNear is that in the form of an order, it can return the results for the maximum document size because all matching documents are returned in a single result document Are there. It is also important to add a distance area in each result document, whether or not it is an issue based on your usage.
Near $ $ is a query operator so that the result is larger than a single document (they are still returned in the same response, but not a single document). You can also determine the maximum number of documents through the query range ()
$ , as long as they <
geore command from code> diagnostics (for example distance or location matching)
Comments
Post a Comment