Commit 564c3d9a authored by Thomas Löffler's avatar Thomas Löffler
Browse files

[BUGFIX] Add configuration to fetch extensions as well

parent e025b835
Pipeline #20202 passed with stages
in 4 minutes and 34 seconds
......@@ -40,6 +40,8 @@ class SolrSearch implements MiddlewareInterface
'tx_terfe2_domain_model_extension'
];
protected $queryFields = 'content^40.0, title^5.0, keywords^2.0, tagsH1^5.0, tagsH2H3^3.0, tagsH4H5H6^2.0, tagsInline^1.0, description^4.0, abstract^1.0, subtitle^1.0, navtitle^1.0, author^1.0, author_textWstM^1.0, extensionKey_stringS^50.0';
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
{
$response = $handler->handle($request);
......@@ -48,6 +50,12 @@ class SolrSearch implements MiddlewareInterface
return $response;
}
// Use all sites to get extensions, too.
$GLOBALS['TSFE']->tmpl->setup['plugin.']['tx_solr.']['search.']['query.']['allowedSites'] = '*';
// Set query fields
$GLOBALS['TSFE']->tmpl->setup['plugin.']['tx_solr.']['search.']['query.']['queryFields'] = $this->queryFields;
if ($queryParams['type']) {
$GLOBALS['TSFE']->tmpl->setup['plugin.']['tx_solr.']['search.']['query.']['filter.']['typeFilter'] = 'type:' . $queryParams['type'];
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment