ext-solr icon indicating copy to clipboard operation
ext-solr copied to clipboard

[TASK] Check simulated HTTP_HOST during indexing

Open dkd-friedrich opened this issue 1 year ago • 2 comments

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.

dkd-friedrich avatar Mar 13 '23 07:03 dkd-friedrich

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.

dmitryd avatar May 10 '23 13:05 dmitryd

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)

pi-phi avatar May 24 '23 14:05 pi-phi