-
Type: New Feature
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: 1.4.0
-
Component/s: None
-
None
Both mongoc_collection_create_index and mongoc_collection_create_index_with_opts take a mongoc_index_opt_t that is an API mistake. Replace with a new function that takes only a collection, index name, arbitrary bson_t options, and an error-out pointer.
Original: "storage engine index options limitation":
The mongoc_index_opt_t field storage_options currently only supports giving a configuration string to the wiredTiger storage engine (no custom storage engine would be able to give options for index creation, and any additions to the wiredTiger index options would have to be supplemented by a change in the driver to support it).
On top of that, it can only be done by casting a mongoc_index_opt_wt_t* to a mongoc_index_opt_storage_t*, and there's no documentation for that process (the source code has to be read to realize this is what needs to be done).
Shouldn't the storage engine options just be a bson_t, as is generated by the driver anyway? e.g. the following could be passed in:
{"wiredTiger": {"configString": "myconfig"}}
rather than:
(mongoc_index_opt_storage_t*)wt_opts
- depends on
-
CDRIVER-2096 Flexible index-creation
- Closed
- is related to
-
CDRIVER-1372 Support providing collation per operation
- Closed