@@ -1342,6 +1342,8 @@ def add_inverted_index(
1342
1342
includeAllFields : Optional [bool ] = None ,
1343
1343
trackListPositions : Optional [bool ] = None ,
1344
1344
searchField : Optional [bool ] = None ,
1345
+ primaryKeyCache : Optional [bool ] = None ,
1346
+ cache : Optional [bool ] = None ,
1345
1347
) -> Result [Json ]:
1346
1348
"""Create a new inverted index, introduced in version 3.10.
1347
1349
@@ -1351,22 +1353,31 @@ def add_inverted_index(
1351
1353
:type name: str | None
1352
1354
:param inBackground: Do not hold the collection lock.
1353
1355
:type inBackground: bool | None
1354
- :param parallelism:
1356
+ :param parallelism: The number of threads to use for indexing the fields.
1355
1357
:type parallelism: int | None
1356
- :param primarySort:
1357
- :type primarySort: Json | None
1358
- :param storedValues:
1358
+ :param primarySort: Primary sort order to enable an AQL optimization.
1359
+ :type primarySort: Optional[Json]
1360
+ :param storedValues: An array of objects with paths to additional
1361
+ attributes to store in the index.
1359
1362
:type storedValues: Sequence[Json] | None
1360
- :param analyzer:
1361
- :type analyzer: str | None
1362
- :param features:
1363
+ :param analyzer: Analyzer to use by default.
1364
+ :type analyzer: Optional[ str]
1365
+ :param features: List of Analyzer features.
1363
1366
:type features: Sequence[str] | None
1364
- :param includeAllFields:
1367
+ :param includeAllFields: This option only applies if you use the
1368
+ inverted index in search-alias views.
1365
1369
:type includeAllFields: bool | None
1366
- :param trackListPositions:
1370
+ :param trackListPositions: This option only applies if you use the
1371
+ inverted index in search-alias views, and searchField is true.
1367
1372
:type trackListPositions: bool | None
1368
- :param searchField:
1373
+ :param searchField: This option only applies if you use the inverted
1374
+ index in search-alias views
1369
1375
:type searchField: bool | None
1376
+ :param primaryKeyCache: Always cache the primary key column in memory.
1377
+ :type primaryKeyCache: bool | None
1378
+ :param cache: Always cache the field normalization values in memory
1379
+ for all fields by default.
1380
+ :type cache: bool | None
1370
1381
:return: New index details.
1371
1382
:rtype: dict
1372
1383
:raise arango.exceptions.IndexCreateError: If create fails.
@@ -1395,6 +1406,10 @@ def add_inverted_index(
1395
1406
data ["searchField" ] = searchField
1396
1407
if fields is not None :
1397
1408
data ["fields" ] = fields
1409
+ if primaryKeyCache is not None :
1410
+ data ["primaryKeyCache" ] = primaryKeyCache
1411
+ if cache is not None :
1412
+ data ["cache" ] = cache
1398
1413
1399
1414
return self ._add_index (data )
1400
1415
0 commit comments