teaminmedias-pluswerk / ke_search

Search Extension for TYPO3 Content Management System, including faceting search functions.
https://extensions.typo3.org/extension/ke_search/
GNU General Public License v3.0
35 stars 62 forks source link

ke_search DOKTYPE_LINK Indexing and Filters #429

Closed OnyxPisces closed 3 years ago

OnyxPisces commented 3 years ago

TYPO3 Version: 9.5.27 ke_search Version: 3.8.1

Issue: I've come across an issue where the ke_search extension does not index pages of the type "DOKTYPE_LINK" ID [3] aka Link to External URL when there is no active content listed on the page, even though the page type is included in the Indexer configuration [index_page_doctypes]. In my opinion, pages which link to an external URL would generally not be filled with content.

As mentioned, when active content elements can be found on said page, the page is indexed and listed in the search result. However, if a search is conducted and the search box includes filters and those filters apply to the page of the type "DOKTYPE_LINK" it is not listed in the search result.

Is there any way to fix this issue?

christianbltr commented 3 years ago

Yes I also think a page of type "DOKTYPE_LINK" will most likely not have any content as it wouldn't be displayed in the frontend.

It's the default behaviour of ke_search not to create index records for empty pages.

So, if you allow pages of this type to be indexed, you could add some "dummy content" via a hook (modifyPagesIndexEntry in Classes/Indexer/Types/Page.php).

If the page has content and is indexed, the filter functions should work like on any other pages. I just tested this in my test environment and it worked as expected.