Index
Zusammenfassung
The Index object contains information about an index on a table or feature class.
Diskussion
An Index object cannot be created directly. Access Index objects using the ListIndexes or Describe functions.
Eigenschaften
| Name | Erläuterung | Datentyp |
|---|---|---|
|
fields (Schreibgeschützt) |
A list of |
Field |
|
isAscending (Schreibgeschützt) |
Specifies whether the index will be in ascending order. |
Boolean |
|
isFullText (Schreibgeschützt) |
Specifies whether the index is a full-text index. |
Boolean |
|
isUnique (Schreibgeschützt) |
Specifies whether the index is a unique index. |
Boolean |
|
name (Schreibgeschützt) |
The name of the index. |
String |
Codebeispiel
Index example
Display index properties for a specified table.
import arcpy
feature_class = r"c:\data.gdb\wells"
# Create a list of indexes using the ListIndexes function
indexes = arcpy.ListIndexes(feature_class)
# Iterate through the indexes
for index in indexes:
# Print index properties
print(f"Name: {index.name}")
print(f"\tAscending index : {index.isAscending}")
print(f"\tUnique index : {index.isUnique}")
print(f"\tFull-text index : {index.isFullText}")
print(f"\tNumber of fields : {len(index.fields)}\n")