【发布时间】:2021-02-01 13:51:22
【问题描述】:
pages 记录的索引方式与其他记录不同。它们代表从其他记录构建的网站的单个页面。所以这些页面被索引访问前端。
时不时地有前端无法被索引的情况。 pagesrecords 可以添加到索引队列中,但所有索引调用都会导致错误。
索引页面需要什么?
当然,您需要连接到 solr 服务器和基本配置来激活 solr 索引器,但是如果您可以索引其他记录,例如新闻。
您需要一些排版配置,如果您包含扩展中的静态模板,则应该存在这些配置。:
plugin.tx_solr {
index {
queue {
pages = 1
pages {
initialization = ApacheSolrForTypo3\Solr\IndexQueue\Initializer\Page
// allowed page types (doktype) when indexing records from table "pages"
allowedPageTypes = 1,7,4
indexingPriority = 0
indexer = ApacheSolrForTypo3\Solr\IndexQueue\PageIndexer
indexer {
// add options for the indexer here
}
// Only index standard pages and mount points that are not overlayed.
additionalWhereClause = (doktype = 1 OR doktype=4 OR (doktype=7 AND mount_pid_ol=0)) AND no_search = 0
//exclude some html parts inside TYPO3SEARCH markers by classname (comma list)
excludeContentByClass = typo3-search-exclude
fields {
sortSubTitle_stringS = subtitle
}
}
}
}
}
但只有这样并不能获取索引中的页面内容。
【问题讨论】:
-
您首先应该做的一件事是清理。您尝试设置的大多数选项已由 EXT:solr 设置。如果我是你。我会删除这一切,可能只添加那些
*_*S声明。例如,绝对不需要索引器或初始化器。然后你应该看看日志,因为它们通常会告诉你出了什么问题。 -
对不起。得到了错误的TS。它应该是扩展的静态模板的定义。现在是 ext:solr 10.0.3 的定义