TYPO3。标题中的扩展“索引搜索”。如何从搜索结果中排除目标页面?

问题描述 投票:0回答:2

目标页面在setup.typoscript中被排除在搜索结果之外。但在结果中它出现了。

targetPid为179.

setup.typoscript

lib.headerSearch = USER
lib.headerSearch {
    userFunc = TYPO3\CMS\Extbase\Core\Bootstrap->run
    extensionName = IndexedSearch
    pluginName = Pi2
    vendorName = TYPO3\CMS
    switchableControllerActions {
        Search {
enter image description here            1 = form
            2 = search
        }
    }
    features {
        requireCHashArgumentForActionArguments = 0
    }
    view < plugin.tx_indexedsearch.view
    templateRootPaths {
        0 = EXT:indexed_search/Resources/Private/Templates/
        10 = {$plugin.tx_indexedsearch.view.templateRootPath}
        20 = EXT:site_package/Resources/Private/Templates/
    }

    partialRootPaths {
        0 = EXT:indexed_search/Resources/Private/Partials/
        10 = {$plugin.tx_indexedsearch.view.partialRootPath}
        20 = EXT:site_package/Resources/Private/Partials/Search/
    }

    partialRootPaths {
        10 = EXT:bootstrap_package/Resources/Private/Partials/IndexedSearch/
        20 = EXT:site_package/Resources/Private/Partials/Search/
    }
    
    settings =< plugin.tx_indexedsearch.settings    
    settings.results.excludeUidList = 179
}

excludeUidList exists in results

结果页面出现在结果集中[-1].rows

search typo3
2个回答
0
投票

你确定,

excludeUidList
是一个有效的设置吗?我在文档中找不到它:https://docs.typo3.org/c/typo3/cms-indexed-search/main/en-us/Configuration/TypoScript/Index.html

indexed_search 就像一个普通的爬虫:所以你可以通过元标记和页面设置“隐藏”页面:

page.meta {
  robots = INDEX,FOLLOW    
  robots.override = NOINDEX,NOFOLLOW 
  robots.override.if.isTrue.field = no_search 
}

0
投票

excludeUidList
是属于 TypoScript
HMENU
的参数,但 IIRC 不属于索引搜索。

如果您想从搜索结果中排除一个页面,只需转到该页面编辑表单的

behaviour
选项卡,然后单击
Include in Search[no_search]
开关

© www.soinside.com 2019 - 2024. All rights reserved.