Sleimanx2\Plastic\Connection::suggestStatement PHP Method

suggestStatement() public method

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

Usage Example

Example #1
0
 /**
  * Execute the suggest query against elastic and return the raw result if model not set.
  *
  * @return array
  */
 public function get()
 {
     return $this->connection->suggestStatement(['index' => $this->getIndex(), 'body' => $this->toDSL()]);
 }