Allow sparse compound indexes
This commit is contained in:
committed by
George Macon
parent
31d7f70e27
commit
00221e3410
@@ -839,10 +839,6 @@ class BaseDocument(object):
|
||||
|
||||
if index_list:
|
||||
spec['fields'] = index_list
|
||||
if spec.get('sparse', False) and len(spec['fields']) > 1:
|
||||
raise ValueError(
|
||||
'Sparse indexes can only have one field in them. '
|
||||
'See https://jira.mongodb.org/browse/SERVER-2193')
|
||||
|
||||
return spec
|
||||
|
||||
|
||||
Reference in New Issue
Block a user