Added Downloads to search index.

This commit is contained in:
orasche committed 2026-08-21 15:44:03 +02:00
1 parent 710f95794c
commit cf7a04ea15
6 files changed
+295 -22

No files matched your search

@@ -59,6 +59,19 @@ class SearchJsonRenderer
}
private const CTYPE = 'solr_pi_results';
/**
* Solr document types (index.queue config tables) to frontend-friendly
* type labels. Unknown types pass through verbatim.
*/
private const TYPE_LABELS = [
'pages' => 'page',
'tx_vitec_domain_model_product' => 'product',
'tx_vitec_domain_model_market' => 'market',
'tx_vitec_domain_model_usecase' => 'story',
'tx_news_domain_model_news' => 'news',
'tx_vitec_domain_model_download' => 'download',
];
private const TEASER_FALLBACK_LENGTH = 250;
#[AsAllowedCallable]
@@ -173,7 +186,7 @@ class SearchJsonRenderer
$results[] = [
'title' => (string)$document->getTitle(),
'url' => (string)$document->getUrl(),
'type' => (string)$document->getType(),
'type' => self::TYPE_LABELS[$document->getType()] ?? (string)$document->getType(),
'teaser' => $teaser,
];
}