Bug #22296
closedIS cannot not index files if absRefPrefix is set and indexExternalURLs is not
0%
Description
If config.absRefPrefix is set, indexed search will not index files. There are several problems in the code:
- all non–relative URLs are treated as external. This if indexExternalURLs is not set in the extension (!!!) properties, no files will be indexed at all
- if config.absRefPrefix is a slash, indexed search will not find any files to index. Files will be indexed only if config.absRefPrefix looks like a baseURL
The attached patch solves the issue in the following way:
- it adds several ways to detect of the file is local. Currently files are always fetched with HTTP, which is a waste of resources. There are several methods for this (absRefPrefix, absolute URL without host, current host, etc)
- it adds an additional check for local files in case of schema is present
- it avoids anchors when they present in the href at position 0
After applying the patch, indexing of files works like a charm and it does not cause any unnecessary HTTP requests.
Revisions 7782 (4.3) and 7780 (4.4)
(issue imported from #M13858)
Files