// And since SearchQuery makes these into GROUP BY queries, if we add
// a field, for PostgreSQL we also need to make it an aggregate or a
// GROUP BY. In this case, we want GROUP BY.
->
groupBy('i.langcode'
) ->
limit(10
) ->
execute();
// Check query status and set messages if needed.
$status =
$query->
getStatus();
if ($status & SearchQuery::EXPRESSIONS_IGNORED
) { $this->messenger->
addWarning($this->
t('Your search used too many AND/OR expressions. Only the first @count terms were included in this search.',
['@count' =>
$this->searchSettings->
get('and_or_limit'
)]));
} if ($status & SearchQuery::LOWER_CASE_OR
) { $this->messenger->
addWarning($this->
t('Search for either of the two terms with uppercase <strong>OR</strong>. For example, <strong>cats OR dogs</strong>.'
));
} if ($status & SearchQuery::NO_POSITIVE_KEYWORDS
) { $this->messenger->
addWarning($this->
formatPlural($this->searchSettings->
get('index.minimum_word_size'
), 'You must include at least one keyword to match in the content, and punctuation is ignored.', 'You must include at least one keyword to match in the content. Keywords must be at least @count characters, and punctuation is ignored.'
));
} return $find;
}