Add type filter and facet counts to the search endpoint

The search JSON gains tab support: the new `filter` GET parameter
restricts results to one document type (product, news, download, story,
page, market); the response carries `filter` (active value or null) and
`facets.type` with per-type counts and active flags. Counts stay
complete while a filter is active (keepAllFacetsOnSelection), so tabs
never collapse - except on an empty filtered result, documented in spec
v1.12 clause 7.16.

The parameter is named `filter` because `type` is TYPO3's reserved
page-type parameter and crashes page resolution; like q and page it is
excluded from cHash validation. Facets come from EXT:solr's native
faceting, serialized generically by SearchJsonRenderer - a future
category facet only needs TypoScript.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-24 15:51:26 +02:00
parent cf7a04ea15
commit 083f0937e2
5 changed files with 162 additions and 10 deletions

View File

@@ -59,6 +59,9 @@ this extension turns every content element into clean **JSON** for a React front
React app renders *and* the serverside validation of the submission.
- 🔎 **SEO built in** — a schema.org `@graph` (Organization, Product, FAQ, Events,
News …) is emitted per page.
- 🔍️ **Full-text search** - Apache Solr indexes pages, products, stories, news and
downloads; the search page answers as JSON (query, paging, highlighted teasers,
typed results) - Clause 7.16 of the architecture spec.
- 🛡️ **Failsoft** — a failing element yields empty output, never a broken page.
## Architecture at a glance
@@ -227,8 +230,10 @@ the forced-download endpoint.
| `vitec:market-dummy-image` | Assign the shared placeholder image to markets without an image |
| `vitec:migrate-newspages` | Rewire impexp-imported old-site news pages (FLUX `colPos` nesting, `internalurl`) via `tx_impexp_origuid` |
| `vitec:import-news` | Import old-site news records from `migrations/news_export.json` |
| `vitec:solr-index` | Work the Solr index queue from the CLI (`--initialize`, `--debug` single-stepping) - EXT:solr 14 ships no console commands of its own |
All commands support `--dry-run` and are safe to re-run.
All import/migration commands support `--dry-run` and are safe to re-run;
`vitec:solr-index` has no dry-run (indexing is idempotent anyway).
## Requirements