/**
  * Attach the query for the stem field. It will build a set of common
  * terms query if use_common_terms is true for the stems clause or a
  * multi match (cross_fields) if false.
  *
  * @param \Elastica\Query\Bool $query the boolean query to attach the new
  * clause
  * @param array $stemFields of boost field
  * @param string $queryString the query
  */
 private function attachMultiFieldsStemClause(\Elastica\Query\Bool $query, array $stemFields, $queryString)
 {
     if ($this->profile['stems_clause']['use_common_terms'] === true) {
         $bool = new \Elastica\Query\Bool();
         $bool->setMinimumNumberShouldMatch(1);
         $this->attachCommonTermsClause($bool, $stemFields, $queryString, $this->profile['stems_clause']);
         $query->addShould($bool);
     } else {
         $query->addShould($this->buildCrossFields($stemFields, $queryString, $this->profile['stems_clause']['min_should_match']));
     }
 }