[TYPO3-dev] TYPO3 4.0 - Indexed Search - Indexing external Files

Jens Hirschfeld Jens.Hirschfeld at KeepOut.de
Thu Apr 13 12:27:33 CEST 2006


Hi,

i have installed TYPO3 4.0 and use the Indexed Search Version 2.9.0.

All Pages are indexed correctly, but the external (pdf) files are not.

I have created a contente element of the type table and listed there
some pdf-files.

In the first column is in each row the link with a short description of
the file. For example:
<link fileadmin/long_filename_20060407-01.pdf _blank>short
description</link>

The link is created correctly in the frontend:
http://www.mydomain.tld/fileadmin/long_filename_20060407-01.pdf

Now the page get indexed, if someone look at it in the frontend.

But the linked pdf files get not!

In the Method 'extractLinks' of the Class 'tx_indexedsearch_indexer' is
the following code:

[...]

// Parse URL:
$qParts = parse_url($linkSource);

[...]

if ($qParts['scheme'])	{
	if ($this->indexerConfig['indexExternalURLs'])	{
		// Index external URL (http or otherwise)
		$this->indexExternalUrl($linkSource);
	}
} elseif (!$qParts['query']) {
	if (t3lib_div::isAllowedAbsPath($linkSource))	{
		$localFile = $linkSource;
	} else {

[...]

If i understand the parse_url() function correct, there will be in every
case a key with the name ['scheme'], because the by typo3 created links
will contain always the complete link (including
http://www.mydomain.tld), or am i wrong?

So here it should be checked, if the domain of the typo3 site is the
same in the link to the external file?

Another Question, i have:
With which Option in TYPO3 can i set
$this->indexerConfig['indexExternalURLs'] = 1 ?

Thanks for Help.

Jens.




More information about the TYPO3-dev mailing list