Facet summary entity and SAPI Event subscriber code polishing.

Created on 30 May 2022, about 3 years ago
Updated 30 May 2025, 6 days ago

Facet summary & Facet entity should have the same base class or trait. List of methods that has to be included in the base class or trait:

  • get/set for facetSourceId
  • loadProcessors
  • getProcessorConfigs
  • getProcessors
  • getProcessorsByStage
  • addProcessor
  • removeProcessor
  • getFacetSource
  • calculateDependencies
  • postSave, postDelete & clearBlockCache - is something that is currently missing in the Summary entity, but it has there to clear block deriver and plugin cache

We can even go further and do the same with entity interfaces.
Pros:

Cons: Architectural changes of a module with this amount of downloads, will cause unexpected issues.

Same goes for the "facets_summary.search_api_subscriber" and "facets.search_api_subscriber" that suppose to alter SAPI query and add facet related information. Currently they are using different approach: Summary alters a query no matter what, facets on the other hand do the check whether this query supports facets. This is wrong because summary can't be built without facets information.
Proposed solution:
- Introduce one entry point, can be an abstract class with a query alter method that then will do the check and trigger corresponding manager method.

📌 Task
Status

Needs work

Version

2.0

Component

Facet summary

Created by

🇺🇦Ukraine bahbka Dnipro

Live updates comments and jobs are added and updated live.
  • API clean-up

    Refactors an existing API or subsystem for consistency, performance, modularization, flexibility, third-party integration, etc. May imply an API change. Frequently used during the Code Slush phase of the release cycle.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024