Sleimanx2\Plastic\PlasticResult::hits PHP Method

hits() public method

Get the raw hits array from Elasticsearch results.
public hits ( ) : array
return array
    public function hits()
    {
        return $this->hits;
    }

Usage Example

コード例 #1
0
 /**
  * PlasticPaginator constructor.
  *
  * @param PlasticResult $result
  * @param int           $limit
  * @param int           $page
  */
 public function __construct(PlasticResult $result, $limit, $page)
 {
     $this->result = $result;
     parent::__construct($result->hits(), $result->totalHits(), $limit, $page, ['path' => LengthAwarePaginator::resolveCurrentPath()]);
     $hitsReference =& $this->items;
     $result->setHits($hitsReference);
 }
All Usage Examples Of Sleimanx2\Plastic\PlasticResult::hits