Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Geo support in SearchBuilder.cfc #8

Open
marcesher opened this issue Dec 21, 2010 · 0 comments
Open

Add Geo support in SearchBuilder.cfc #8

marcesher opened this issue Dec 21, 2010 · 0 comments

Comments

@marcesher
Copy link
Owner

Mongo Supports lightweight geospatial searching, described here: http://www.mongodb.org/display/DOCS/Geospatial+Indexing

I've added an ensureGeoIndex function into Mongo.cfc for creating the indexes, and you can currently use cfmongodb. to perform geo queries like so:

nearResult = mongo.query( collection ).add( "LOC", {"$near" = [38,-85]} ).search(limit=10);

But this is not idiomatic CFMongoDB and I'd like to add functions in SearchBuilder for building up the handful of geo queries.

I'm thinking something like:

mongo.query(coll).$near(field, min, max);

mongo.query(coll).$near(field, min, max, maxDistance);

we'd want support for $within, both "box" and "center", which would probably translate into

withinBox(..) and withinCenter(...)

Anything else?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant