setExplain() публичный Метод

Enables explanation for each hit on how its score was computed.
public setExplain ( boolean $explain )
$explain boolean
Пример #1
0
 /**
  * @group functional
  */
 public function testAggregateWithExplain()
 {
     $aggr = new TopHits('top_tag_hits');
     $aggr->setExplain(true);
     $resultDocs = array();
     $outerAggrResult = $this->getOuterAggregationResult($aggr);
     foreach ($outerAggrResult['buckets'] as $bucket) {
         foreach ($bucket['top_tag_hits']['hits']['hits'] as $doc) {
             $this->assertArrayHasKey('_explanation', $doc);
         }
     }
 }