禁止在Hybris前端上搜索具有特定属性值的产品 [英] Disable search for the products on the Hybris front end having a specific attribute value
问题描述
假设我有一个要求,我不想在Hybris
前端上搜索具有特定属性值的产品.即使Hybris SOLR index
中存在以下产品.
Suppose I have a requirement whereby I don't want to search the products on the Hybris
frontend having a specific attribute value. Even if the following products are present in the Hybris SOLR index
.
如何处理?
推荐答案
应为哪些产品建立索引是由灵活的搜索查询定义的.
Which products should be indexed are defined by flexible search queries.
您可以通过导航到System/Facet Search/Indexed Types
在hmc/backoffice
中找到它们.选择您的索引类型.在这里您可以找到完整查询和更新查询.
You find them in hmc/backoffice
by navigating to System/Facet Search/Indexed Types
. Select your indexed type. There you find full and update queries.
Full SolR Indexer CronJob
使用完整查询,该查询在默认情况下每晚运行,并完全重新创建SolR索引.类似地,Update SolR Indexer CronJob
使用更新查询,该查询默认情况下每小时运行一次,并且仅更新之间进行过更改的产品.因此,您会在更新查询中找到类似WHERE {sl:modifiedtime} >= ?lastIndexTime
的内容,而在完整查询中却找不到该内容.
The full query is used by a Full SolR Indexer CronJob
which runs in the default case every night and recreates the SolR index completely. The update query similarly is used by a Update SolR Indexer CronJob
which runs by default every hour and just updates products which have been changed in between. Therefore you find something like WHERE {sl:modifiedtime} >= ?lastIndexTime
in the update query, which is missing in the full query.
您可以根据需要以各种方式更改查询.例如.假设您的查询是:
You can change the query in every way you need it. E.g. assuming your query is:
SELECT {pk} FROM {Product}
将其更改为
SELECT {pk} FROM {Product} WHERE {myAttribute} LIKE 'index this product'
PS:在关联的Facet搜索配置(System/Facet Search/Facet Search Config
)上找到Solr Indexer Cronjobs
.
PS: Find the Solr Indexer Cronjobs
on your associated Facet Search Config (System/Facet Search/Facet Search Config
).
PPS:还有一个删除查询,您可以在其中定义应从SolR
索引中删除的产品.
PPS: There is also a delete query, where you define products which should be removed from SolR
index.
这篇关于禁止在Hybris前端上搜索具有特定属性值的产品的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!