@@ -1373,7 +1373,7 @@ def add_skiplist_index(
1373
1373
def add_geo_index (
1374
1374
self ,
1375
1375
fields : Fields ,
1376
- ordered : Optional [bool ] = None ,
1376
+ geo_json : Optional [bool ] = None ,
1377
1377
name : Optional [str ] = None ,
1378
1378
in_background : Optional [bool ] = None ,
1379
1379
legacyPolygons : Optional [bool ] = False ,
@@ -1385,8 +1385,10 @@ def add_geo_index(
1385
1385
with at least two floats. Documents with missing fields or invalid
1386
1386
values are excluded.
1387
1387
:type fields: str | [str]
1388
- :param ordered: Whether the order is longitude, then latitude.
1389
- :type ordered: bool | None
1388
+ :param geo_json: Whether to use GeoJSON data-format or not. This
1389
+ parameter has been renamed from `ordered`. See Github Issue
1390
+ #234 for more details.
1391
+ :type geo_json: bool | None
1390
1392
:param name: Optional name for the index.
1391
1393
:type name: str | None
1392
1394
:param in_background: Do not hold the collection lock.
@@ -1400,8 +1402,8 @@ def add_geo_index(
1400
1402
"""
1401
1403
data : Json = {"type" : "geo" , "fields" : fields }
1402
1404
1403
- if ordered is not None :
1404
- data ["geoJson" ] = ordered
1405
+ if geo_json is not None :
1406
+ data ["geoJson" ] = geo_json
1405
1407
if name is not None :
1406
1408
data ["name" ] = name
1407
1409
if in_background is not None :
0 commit comments