Let's say I have the following lines into index.yaml:
----------------------------
- Kind: MyModel
properties:
- name: foo
- name: bar
- Kind: MyModel
properties:
- name: foo
direction: desc
---------------------------
So if I want to create those indexes into mongodb, the correct command would be:
> db.MyModel.ensureIndex({foo:1, bar:1})
> db.MyModel.ensureIndex({foo:-1})
Right?
--
Rafael Sierra
http://blog.rafaelsdm.com