[TYPO3-Solr] RealURL in search results

Jigal van Hemert jigal.van.hemert at typo3.org
Thu Sep 17 12:24:04 CEST 2015


Hi,

On 16/09/2015 09:48, Michael Huber wrote:
> I've successfully integrated SOLR in my TYPO3 but can't get RealURL to
> work in search-results. In index configuration the links are put
> together in the same way they are in my list action. In list action
> RealURL works fine, but in the search results the links are displayed
> plain with the params.
>
> I've read that in most cases the RealURL-conf is claimed to be wrong but
> it works in list action so my configuration is correct. Is there
> anything else to be considered or has to be configured?

The fact that something happens to work does not mean that it's 
configured correctly.

A special thing to consider is that during indexing (at least when the 
cron job triggers the scheduler task) Solr tries to build a Frontend 
environment which is not exactly the same as the normal Frontend 
environment. This cannot be fully blamed to Solr because part of the 
problem is that the PHP environment is different.

For example, forcing absolute URLs may not work correctly because the 
domain name can't be detected correctly in all cases.

There are two places where you can build URLs in the Solr configuration.
The first place is the queue configuration where you can fill the URL 
field. This is used during indexing.
The second place is the results.fieldRenderingInstructions 
configuration. This is used when the result are being displayed.

While it's better for performance to build URL's only once during 
indexing, it might be a solution in some cases to build the URL while 
you display the search results.

Sometimes a combination of certain configurations may result in 
incorrect results, while they both appear to be correct on their own.

-- 
Jigal van Hemert
TYPO3 CMS Active Contributor

TYPO3 .... inspiring people to share!
Get involved: typo3.org


More information about the TYPO3-project-solr mailing list