Create Scalar Index

scalar_index_created = table.create_scalar_index(field_names = ["text"], index_name = "text1_index")

Result:

This method returns a Boolean value to represent whether this operation is successful. If the error pops up when creating scalar index, “ValueError” exception will be raised.

Parameter description:

ParametersDescriptionRequired
field_names (list[str])Field list to indexYes
index_name (str)Index to be createdYes
Table 80 Create Scalar Index (Python API)