createPersistentIndex method
Creates a collection See https://www.arangodb.com/docs/devel/http/indexes-working-with.html for details.
Implementation
Future<IndexResponse> createPersistentIndex({
required String collectionName,
required String indexName,
required List<String> fields,
bool unique = false,
bool deduplicate = false,
bool sparse = false,
bool inBackground = false,
}) async {
final answer = await _httpPost([
'_db',
db,
'_api',
'index'
], {
'name': indexName,
'type': 'persistent',
'fields': fields,
'unique': unique,
'deduplicate': deduplicate,
'sparse': sparse,
'inBackground': inBackground,
}, queryParameters: {
'collection': collectionName,
});
final ret = _toIndexResponse(answer);
return ret;
}