indexed_search 多域 (TYPO3 9 LTS)

indexed_search Multidomain (TYPO3 9 LTS)

有一个多域设置(同一级别上彼此相邻的域),每个域都有自己的搜索页面和配置。我试过了...

plugin.tx_indexedsearch.settings.rootPidList = 3

...仅获取域页面树的搜索结果。但是一旦使用rootPidList,就再也没有结果了。然后我试过了...

plugin.tx_indexedsearch.settings.defaultOptions.sections = rl1_3

...这似乎可以正确地将结果限制在 pagetree(页面 id 3 下方)。

那么 "rootPidList" ment 的用途是什么?

根据代码中的注释(typo3/sysext/indexed_search/Classes/Controller/SearchController.php, Line 232):

Setting the list of root PIDs for the search. Notice, these page IDs MUST have a TypoScript template with root flag on them!

Basically this list is used to select on the "rl0" field and page ids are registered as "rl0" only if a TypoScript template record with root flag is there.

This happens AFTER the use of $this->searchRootPageIdList above because the above will then fetch the menu for the CURRENT site - regardless of this kind of searching here. Thus a general search will lookup in the WHOLE database while a specific section search will take the current sections.

在多域设置中,我们已将 rootPidList 设置为整个根页面(在本例中为 id=457)。

defaultOptions.sections 是这样设置的:

defaultOptions.sections=rl{$customer_theme.search.level}_{$customer_theme.root}

{$customer_theme.search.level} 设置为 1 或 2,具体取决于每个国家/地区是否提供一种以上的语言。
{$customer_theme.root}是根页面(由根页面标志标记)。

例如对于印度尼西亚(英语),我们使用 level = 2 和 root = 12947.