Adding indexes on :position and [[:depth, :asc], [:position, :asc]] to avoid Mongo::OperationFailure: too much data for sort() with no index
This commit is contained in:
parent
333934c022
commit
e2eb8f2e90
@ -10,6 +10,10 @@ module Extensions
|
|||||||
## fields ##
|
## fields ##
|
||||||
field :position, :type => Integer
|
field :position, :type => Integer
|
||||||
|
|
||||||
|
## indexes ##
|
||||||
|
index :position
|
||||||
|
index [[:depth, :asc], [:position, :asc]]
|
||||||
|
|
||||||
## behaviours ##
|
## behaviours ##
|
||||||
acts_as_tree :order => ['position', 'asc']
|
acts_as_tree :order => ['position', 'asc']
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user