diff --git a/src/lib/Query/Content/CriterionVisitor/ContentName.php b/src/lib/Query/Content/CriterionVisitor/ContentName.php index c27f9dc4..71a94208 100644 --- a/src/lib/Query/Content/CriterionVisitor/ContentName.php +++ b/src/lib/Query/Content/CriterionVisitor/ContentName.php @@ -10,31 +10,12 @@ use Ibexa\Contracts\Core\Repository\Values\Content\Query\Criterion; use Ibexa\Contracts\Solr\Query\CriterionVisitor; -use QueryTranslator\Languages\Galach\Generators\ExtendedDisMax; -use QueryTranslator\Languages\Galach\Parser; -use QueryTranslator\Tokenizing; /** * @internal */ final class ContentName extends CriterionVisitor { - private Tokenizing $tokenizer; - - private Parser $parser; - - private ExtendedDisMax $generator; - - public function __construct( - Tokenizing $tokenizer, - Parser $parser, - ExtendedDisMax $generator - ) { - $this->tokenizer = $tokenizer; - $this->parser = $parser; - $this->generator = $generator; - } - public function canVisit(Criterion $criterion): bool { return $criterion instanceof Criterion\ContentName @@ -45,12 +26,8 @@ public function visit(Criterion $criterion, CriterionVisitor $subVisitor = null) { /** @var string $value */ $value = $criterion->value; - $tokenSequence = $this->tokenizer->tokenize($value); - $syntaxTree = $this->parser->parse($tokenSequence); - - $queryString = $this->generator->generate($syntaxTree); $searchField = 'meta_content__name_s'; - return "{!edismax v='{$this->escapeQuote($queryString)}' qf='{$searchField}' uf=-*}"; + return "{!edismax v='{$this->escapeQuote($value)}' qf='{$searchField}' uf=-*}"; } } diff --git a/src/lib/Resources/config/container/solr/criterion_visitors.yml b/src/lib/Resources/config/container/solr/criterion_visitors.yml index 3079945b..7ab6c403 100644 --- a/src/lib/Resources/config/container/solr/criterion_visitors.yml +++ b/src/lib/Resources/config/container/solr/criterion_visitors.yml @@ -237,10 +237,6 @@ services: - {name: ibexa.search.solr.query.content.criterion.visitor} Ibexa\Solr\Query\Content\CriterionVisitor\ContentName: - arguments: - $tokenizer: '@ibexa.solr.query.query_translator.galach.tokenizer' - $parser: '@ibexa.solr.query.query_translator.galach.parser' - $generator: '@ibexa.solr.query.query_translator.galach.generator.edismax' tags: - {name: ibexa.search.solr.query.content.criterion.visitor} - {name: ibexa.search.solr.query.location.criterion.visitor}