Skip to content

Commit

Permalink
IBX-704: Added support for LocationChildrenAggregation (#215)
Browse files Browse the repository at this point in the history
  • Loading branch information
mateuszbieniek authored Jul 29, 2021
1 parent 52ab5f7 commit d2e7ec0
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ services:

EzSystems\EzPlatformSolrSearchEngine\ResultExtractor\AggregationResultExtractor\RangeAggregationKeyMapper\DateTimeRangeAggregationKeyMapper: ~

EzSystems\EzPlatformSolrSearchEngine\ResultExtractor\AggregationResultExtractor\TermAggregationKeyMapper\LocationChildrenAggregationKeyMapper: ~

EzSystems\EzPlatformSolrSearchEngine\ResultExtractor\AggregationResultExtractor\RangeAggregationKeyMapper\FloatRangeAggregationKeyMapper: ~

EzSystems\EzPlatformSolrSearchEngine\ResultExtractor\AggregationResultExtractor\RangeAggregationKeyMapper\IntRangeAggregationKeyMapper: ~
Expand Down Expand Up @@ -144,6 +146,14 @@ services:
- { name: ezplatform.search.solr.query.content.aggregation_result_extractor }
- { name: ezplatform.search.solr.query.location.aggregation_result_extractor }

ezplatform.search.solr.query.common.aggregation_result_extractor.location_children_term:
class: EzSystems\EzPlatformSolrSearchEngine\ResultExtractor\AggregationResultExtractor\TermAggregationResultExtractor
arguments:
$aggregationClass: 'eZ\Publish\API\Repository\Values\Content\Query\Aggregation\Location\LocationChildrenTermAggregation'
$keyMapper: '@EzSystems\EzPlatformSolrSearchEngine\ResultExtractor\AggregationResultExtractor\TermAggregationKeyMapper\LocationAggregationKeyMapper'
tags:
- { name: ezplatform.search.solr.query.location.aggregation_result_extractor }

ezplatform.search.solr.query.common.aggregation_result_extractor.subtree_term.nested:
class: EzSystems\EzPlatformSolrSearchEngine\ResultExtractor\AggregationResultExtractor\NestedAggregationResultExtractor
decorates: ezplatform.search.solr.query.common.aggregation_result_extractor.subtree_term
Expand Down
9 changes: 9 additions & 0 deletions lib/Resources/config/container/solr/aggregation_visitors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,15 @@ services:
tags:
- { name: ezplatform.search.solr.query.location.aggregation_visitor }

ezpublish.search.solr.query.location.aggregation_visitor.location_children:
class: EzSystems\EzPlatformSolrSearchEngine\Query\Common\AggregationVisitor\LocationChildrenTermAggregationVisitor
factory: [ '@EzSystems\EzPlatformSolrSearchEngine\Query\Common\AggregationVisitor\Factory\SearchFieldAggregationVisitorFactory', 'createTermAggregationVisitor' ]
arguments:
$aggregationClass: 'eZ\Publish\API\Repository\Values\Content\Query\Aggregation\Location\LocationChildrenTermAggregation'
$searchIndexFieldName: 'parent_id_id'
tags:
- { name: ezplatform.search.solr.query.location.aggregation_visitor }

ezpublish.search.solr.query.location.aggregation_visitor.subtree:
class: EzSystems\EzPlatformSolrSearchEngine\Query\Common\AggregationVisitor\SubtreeTermAggregationVisitor
arguments:
Expand Down

0 comments on commit d2e7ec0

Please sign in to comment.