Skip to content
Snippets Groups Projects
Commit ccfde219 authored by Kalle Vuorjoki's avatar Kalle Vuorjoki
Browse files

Issue ##3186932 by sokru: Replace deprecated Elastica\Query\Match

parent 51d1719d
Branches
Tags
1 merge request!38Resolve #3186932: by sokru, ayalon, Marios Anagnostopoulos: Use...
......@@ -5,12 +5,13 @@ namespace Drupal\elasticsearch_connector\Elasticsearch\Parameters\Builder;
use Drupal\Core\Entity\ContentEntityInterface;
use Drupal\Core\Language\LanguageInterface;
use Drupal\Core\StringTranslation\StringTranslationTrait;
use Drupal\elasticsearch_connector\ElasticSearch\Parameters\Factory\IndexFactory;
use Elastica\Query;
use Elastica\Query\AbstractQuery;
use Elastica\Query\BoolQuery;
use Elastica\Query\Exists;
use Elastica\Query\FunctionScore;
use Elastica\Query\Match;
use Elastica\Query\MatchQuery;
use Elastica\Query\MatchAll;
use Elastica\Query\MoreLikeThis;
use Elastica\Query\MultiMatch;
......@@ -704,7 +705,7 @@ class SearchBuilder {
if (empty($mlt_options)) {
return;
}
$index_params = IndexHelper::index($this->index);
$index_params = IndexFactory::index($this->index);
$language_ids = $this->query->getLanguages();
if (empty($language_ids)) {
......@@ -814,7 +815,7 @@ class SearchBuilder {
$agg->setInclude($include);
$agg->setSize($suggester_limits['elasticsearch_terms'] ?? $suggester_limits['server']);
$match = new Match($query_field, $user_input);
$match = new MatchQuery($query_field, $user_input);
$this->esRootQuery->addMust($match);
$this->esQuery->addAggregation($agg);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment