Adding an Attribute Index to a Shapefile fails for a Python Plugin in QGIS: For example - the following python Code in a Plugin
ly = QgsVectorLayer(data_source, layer_name,"ogr")
prov = ly.dataProvider()
prov.createAttributeIndex(i)
results in the error Message:
'QgsVectorDataProvider' object has no attribute 'createAttributeIndex'
Whereas Adding a Spatial Index works without any problem
ly = QgsVectorLayer(data_source, layer_name,"ogr")
prov = ly.dataProvider()
prov.createSpatialIndex()
Is this a Bug?
Thanks in Advance