I currently have a assignments
collection with the following structure:
{
_id:Object("basdfasdfasdfasdf"),
name:"Entry one",
...//other properties
services:[
{
...//other properties
workers: [
{
name:"John"
}
]
}
]
}
Am I able to create a multikey index on workers.name
array? This is an array of arrays situation. If this isn't possible I would need to make the services
to be it's own collection so we can put a multikey index on the array of service.workers
, correct? The reason I don't want services
to be it's own collection is so that I wouldn't need to do an aggregation step everytime I want to pull it out of the db.
Thoughts?