SyncIndexBuilder

class aerospike_sdk.sync.operations.index.SyncIndexBuilder[source]

Bases: object

Synchronous façade over IndexBuilder.

Chain on_bin(), named(), numeric() / string(), optional collection(), then create() or drop(); each mutating step is stored locally and replayed onto a fresh async builder when executing.

See also

IndexBuilder

__init__(async_client, namespace, set_name, loop_manager)[source]

Pair with namespace/set and the parent’s loop manager.

on_bin(bin_name)[source]

Set which bin this secondary index covers.

Return type:

SyncIndexBuilder

named(index_name)[source]

Set the secondary index name the cluster uses (required for create and drop).

Return type:

SyncIndexBuilder

numeric()[source]

Set the secondary index type to numeric; use string() for string bins.

Return type:

SyncIndexBuilder

string()[source]

Set the secondary index type to string; use numeric() for numeric bins.

Return type:

SyncIndexBuilder

collection(collection_index_type)[source]

Set the collection index variant for map or list bins.

Parameters:

collection_index_type (CollectionIndexType) – Same as collection().

Return type:

SyncIndexBuilder

context(ctx)[source]

Set a CDT context path for indexing a nested list or map element.

Parameters:

ctx (List[CTX]) – CDT path entries (e.g., [CTX.map_key("outer")]).

Return type:

SyncIndexBuilder

Returns:

self for method chaining.

create()[source]

Create the index (blocks until the admin call completes).

Raises:
Return type:

None

drop()[source]

Drop the index (blocks until the admin call completes).

Raises:
Return type:

None