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

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

        return $search;
    }
public function createSearch ( $ query = '' , $ options = null , BuilderInterface $ builder = null ) { $ search = $ this -> getIndex ( ) -> createSearch ( $ query , $ options , $ builder ) ; $ search -> addType ( $ this ) ; return $ search ; }
Create search object.

@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)
@param BuilderInterface             $builder

@return Search
Create search object .