Support for geo search
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
from modules.utils import configGet
|
||||
from pymongo import MongoClient
|
||||
from pymongo import MongoClient, GEOSPHERE
|
||||
|
||||
db_config = configGet("database")
|
||||
|
||||
@@ -32,4 +32,6 @@ col_users = db.get_collection("users")
|
||||
col_albums = db.get_collection("albums")
|
||||
col_photos = db.get_collection("photos")
|
||||
col_videos = db.get_collection("videos")
|
||||
col_tokens = db.get_collection("tokens")
|
||||
col_tokens = db.get_collection("tokens")
|
||||
|
||||
col_photos.create_index([("location", GEOSPHERE)])
|
Reference in New Issue
Block a user