public function search($query)
    {
        $classes = $this->getClassMetadata();
        return $this->_sm->getUnitOfWork()->loadCollection($classes, $query);
    }
public function search($query)
    {
        $classes = $this->getClassMetadata();
        return $this->_sm->getUnitOfWork()->loadCollection($classes, $query);
    }
public function search ( $ query ) { $ classes = $ this -> getClassMetadata ( ) ; return $ this -> _sm -> getUnitOfWork ( ) -> loadCollection ( $ classes , $ query ) ; }
Execute a direct search query on the associated index and type

@param object $query
Execute a direct search query on the associated index and type