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

Set the minimum_should_match parameter.
public setMinimumShouldMatch ( integer | string $minimum )
$minimum integer | string minimum number of low frequency terms which must be present
Пример #1
0
 /**
  * Finds all documents matching the query but groups common words,
  * i.e. the, and runs them after the initial query for more efficiency.
  *
  * @link https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-common-terms-query.html
  *
  * @param string $field
  * @param string $query
  * @param float $cutOff
  * @param int|bool $minimumMatch
  * @return Query
  */
 public function common($field, $query, $cutOff = 0.001, $minimumMatch = false)
 {
     $common = new Common($field, $query, $cutOff);
     if ($minimumMatch) {
         $common->setMinimumShouldMatch($minimumMatch);
     }
     $query = $this->newQuery($common);
     $this->query[] = $query;
     return $query;
 }