lib/Elastica/Type.php
public function search($query = '', $options = null)
    {
        $search = $this->createSearch($query, $options);

        return $search->search();
    }
public function search($query = '', $options = null)
    {
        $search = $this->createSearch($query, $options);

        return $search->search();
    }
public function search ( $ query = '' , $ options = null ) { $ search = $ this -> createSearch ( $ query , $ options ) ; return $ search -> search ( ) ; }
Do a search on this type.

@param string|array|\Elastica\Query $query   Array with all query data inside or a Elastica\Query object
@param int|array                    $options OPTIONAL Limit or associative array of options (option=>value)

@return \Elastica\ResultSet with all results inside

@see \Elastica\SearchableInterface::search
Do a search on this type .