added test for path in selector
Added support for collections of docs