Sleimanx2\Plastic\Connection::searchStatement PHP Method

searchStatement() public method

Execute a map statement on index;.
public searchStatement ( array $search ) : array
$search array
return array
    public function searchStatement(array $search)
    {
        return $this->elastic->search($this->setStatementIndex($search));
    }

Usage Example

Example #1
0
 /**
  * Execute the search query against elastic and return the raw result.
  *
  * @return array
  */
 public function getRaw()
 {
     $params = ['index' => $this->getIndex(), 'type' => $this->getType(), 'body' => $this->toDSL()];
     return $this->connection->searchStatement($params);
 }