setScoreMode() public method

Set score method.
public setScoreMode ( string $scoreMode )
$scoreMode string Options: avg, total, max and none.
Example #1
0
 public function nested($fullPath, $value, $scoreMode = 'none')
 {
     $path = explode($fullPath, '.')[0];
     $nestedQuery = $this->match([$fullPath => $value]);
     $nested = new Nested();
     $nested->setPath($path);
     $nested->setQuery($nestedQuery);
     $nested->setScoreMode($scoreMode);
     $query = $this->newQuery($nested);
     $this->query[] = $query;
     return $query;
 }