Skip to content

Commit

Permalink
fixup! EZP-27458: Impl. Aggregation API
Browse files Browse the repository at this point in the history
  • Loading branch information
adamwojs committed Sep 3, 2020
1 parent 6f96d6d commit 58bf04e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ private function getSearchFieldName(CountryTermAggregation $aggregation): string
case CountryTermAggregation::TYPE_NAME:
return 'name';
case CountryTermAggregation::TYPE_ALPHA_2:
return 'aplha2';
return 'alpha2';
case CountryTermAggregation::TYPE_ALPHA_3:
return 'alpha3';
case CountryTermAggregation::TYPE_IDC:
Expand Down
7 changes: 5 additions & 2 deletions lib/Resources/config/container/solr/aggregation_visitors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,15 @@ services:
- { name: ezplatform.search.solr.query.content.aggregation_visitor }
- { name: ezplatform.search.solr.query.location.aggregation_visitor }

EzSystems\EzPlatformSolrSearchEngine\Query\Common\AggregationVisitor\AggregationFieldResolver\CountryFieldTermAggregationFieldResolver:
arguments:
$fieldNameResolver: '@ezpublish.search.common.field_name_resolver'

ezpublish.search.solr.query.common.aggregation_visitor.field.country_term:
class: EzSystems\EzPlatformSolrSearchEngine\Query\Common\AggregationVisitor\TermAggregationVisitor
factory: ['@EzSystems\EzPlatformSolrSearchEngine\Query\Common\AggregationVisitor\Factory\ContentFieldAggregationVisitorFactory', 'createTermAggregationVisitor']
arguments:
$aggregationClass: 'eZ\Publish\API\Repository\Values\Content\Query\Aggregation\Field\CountryTermAggregation'
$searchIndexFieldName: 'alpha2'
$aggregationFieldResolver: '@EzSystems\EzPlatformSolrSearchEngine\Query\Common\AggregationVisitor\AggregationFieldResolver\CountryFieldTermAggregationFieldResolver'
tags:
- { name: ezplatform.search.solr.query.content.aggregation_visitor }
- { name: ezplatform.search.solr.query.location.aggregation_visitor }
Expand Down

0 comments on commit 58bf04e

Please # to comment.