geospatial - mongodb geoNear vs near -


It seems that two similar functions work for geological questions - near $ and < Code> $ geoNear . According to the Mongo Docks

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 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?

The efficiency must be the same for either. The main limit of

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 ()

I recommend that users do not stick to $ , as long as they < geore command from code> diagnostics (for example distance or location matching)

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -