Skip to content

Commit

Permalink
Fix Call to a member function setName() on null - in \Smile\Elasticsu…
Browse files Browse the repository at this point in the history
…iteCore\Search\Request\Query\Fulltext\QueryBuilder
  • Loading branch information
aydeg authored and romainruaud committed Jul 15, 2024
1 parent eb78f05 commit 723e7c5
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ public function create(ContainerConfigurationInterface $containerConfig, $queryT
$relevanceConfig = $containerConfig->getRelevanceConfig();
if ($relevanceConfig->getSpanMatchBoost()) {
$spanQuery = $this->getSpanQuery($containerConfig, $queryText, $relevanceConfig->getSpanMatchBoost());
$spanQuery->setName('SPAN');
if ($spanQuery !== null) {
$spanQuery->setName('SPAN');
$queryParams = [
'must' => [$query],
'should' => [$spanQuery],
Expand Down

0 comments on commit 723e7c5

Please sign in to comment.