How do I create index on items.id field in this mongokit schema?
I tried to creating index on items.id, but it's throwing ValueError: Error in indexes: can't find items.id in structure
.
structure = {
'items': [{
'id': int,
}]
}
indexes = [{
'fields': ['items.id'],
}]
Currently, MongoKit's index validation doesn't support validation on indexed array. For this usecase, you have disabled indexes validation:
indexes = [
{'fields': ['items.id'], 'check':False}
]
you can vote on this issue here : http://github.com/namlook/mongokit/issues#issue/42