Elastica\Result::getExplanation PHP Method

getExplanation() public method

Returns explanation on how its score was computed.
public getExplanation ( ) : array
return array explanations
    public function getExplanation()
    {
        return $this->getParam('_explanation');
    }

Usage Example

 /**
  * Returns the explanation array for this document as returned from ElasticSearch.
  *
  * If this is a new document, or the query used to create it did not ask for
  * explanation, this function will return an empty array.
  *
  * @return array
  */
 public function explanation()
 {
     if ($this->_result) {
         return $this->_result->getExplanation();
     }
     return [];
 }
All Usage Examples Of Elastica\Result::getExplanation