Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Implementation of Aggregation API (see ezsystems/ezplatform-kernel#94) for Solr Search Engine.
Sequence diagram
Extension points
The following extension points has been introduced in order to be able to handle custom aggregations.
EzSystems\EzPlatformSolrSearchEngine\Query\AggregationVisitor
AggregationVisitor
is responsible for building aggregation query base on aggregation definition.EzSystems\EzPlatformSolrSearchEngine\Query\AggregationVisitor::visit
result will be encoded as JSON and should be compatible with JSON Facet API described here: https://lucene.apache.org/solr/guide/7_7/json-facet-api.html.AggregationVisitor
implementations should be registered as a service and tagged withezplatform.search.solr.query.content.aggregation_visitor
and/orezplatform.search.solr.query.location.aggregation_visitor
tag.EzSystems\EzPlatformSolrSearchEngine\ResultExtractor\AggregationResultExtractor
AggregationResultExtractor
is responsible for transforming raw aggregation results intoAggregationResult
object.AggregationResultExtractor
implementations should be registered as a service and tagged withezplatform.search.solr.query.content.aggregation_result_extractor
and/orezplatform.search.solr.query.location.aggregation_result_extractor
tag.Deprecations
The following classes/interfaces has been deprecated:
\EzSystems\EzPlatformSolrSearchEngine\Query\FacetFieldVisitor
\EzSystems\EzPlatformSolrSearchEngine\Query\FacetBuilderVisitor
and all inheriting classesas well as the following services/aliases:
ezpublish.search.solr.result_extractor.native
ezpublish.search.solr.result_extractor
BC Breaks
$languageSettings
parameter toEzSystems\EzPlatformSolrSearchEngine\Query\QueryConverter::convert
$languageFilter
and$aggregations
parameters toEzSystems\EzPlatformSolrSearchEngine\ResultExtractor::extract
Links
Checklist
$ composer fix-cs
).