@@ -1373,7 +1373,7 @@ def add_skiplist_index(
13731373 def add_geo_index (
13741374 self ,
13751375 fields : Fields ,
1376- ordered : Optional [bool ] = None ,
1376+ geo_json : Optional [bool ] = None ,
13771377 name : Optional [str ] = None ,
13781378 in_background : Optional [bool ] = None ,
13791379 legacyPolygons : Optional [bool ] = False ,
@@ -1385,8 +1385,10 @@ def add_geo_index(
13851385 with at least two floats. Documents with missing fields or invalid
13861386 values are excluded.
13871387 :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
13901392 :param name: Optional name for the index.
13911393 :type name: str | None
13921394 :param in_background: Do not hold the collection lock.
@@ -1400,8 +1402,8 @@ def add_geo_index(
14001402 """
14011403 data : Json = {"type" : "geo" , "fields" : fields }
14021404
1403- if ordered is not None :
1404- data ["geoJson" ] = ordered
1405+ if geo_json is not None :
1406+ data ["geoJson" ] = geo_json
14051407 if name is not None :
14061408 data ["name" ] = name
14071409 if in_background is not None :
0 commit comments