ext-solr
ext-solr copied to clipboard
[TASK] Check simulated HTTP_HOST during indexing
What should be done in the scope of this task?
IndexService
sets the HTTP_HOST during indexing in initializeHttpServerEnvironment
and resets it in restoreOriginalHttpHost
after indexing. Needs of RealURL are the reason for that, but as RealURL is obsolete since TYPO3 9.5 we should check if manipulating the HTTP_HOST is still required and remove this manipulation if not.
There is no HTTP_HOST
at cli environments, which will make any host-based TS condition fail. It will also make GeneralUtility::getIndpEnv()
return wrong results in various cases. The comment may say about RealURL but it is not only that.
I suggest to change the comment instead.
we use the configuration queue.pages.indexer.frontendDataHelper.host
to index pages with a local domain rather than the site is public accessed, because of proxy problems.
the result: no pages occur in the search results as all pages are indexed to the replacement domain (which is only accessible locally)
in the solr documents the given URL is splitted in site : replacement.domain
and url : /path/of/page
, which results in no pages documents in search results. (TYPO3 11.5.27, ext:solr 11.5.0, solr 8.11.2)
expected behaviour: the original domain should be stored in the field site
dirty solution:
add the helper domain to plugin.tx_solr.search.query.allowedSites
and replace all occurrences of the helper domain in the partial for documents (/partials/Result/Documents.html
)