【问题标题】:Hybris Facet NavigationHybris 分面导航
【发布时间】:2014-04-01 03:30:30
【问题描述】:

有人知道如何在产品列表页面上显示的 Facet Navigation 中添加其他属性吗?到目前为止我只能选择价格范围,但是我想添加品牌和其他过滤器,您知道如何通过 hMC 维护它吗?我认为这与 solr 配置有关,但我对 hybris 还很陌生...

【问题讨论】:

  • 阅读相关的论坛和维基
  • HMC > 系统 > 构面配置。在 sampledata 扩展中查找示例 impex,我认为 yaccelerator 中也可能存在 impex。
  • 使用 solr.impex 文件创建新的 facet 属性。看看服装或电子商店的 slor.impex 文件也是如何创建的。有时您还需要通过 hmc 更新构面索引。

标签: hybris


【解决方案1】:

如果您有 hybris wiki 访问权限,那么您可以轻松完成此操作。在商业线索中,他们已经涵盖了方面搜索。请看一下。 https://wiki.hybris.com/display/R5T/Tweaking+SolR+Attributes+and+Facets

【讨论】:

    【解决方案2】:

    不幸的是,您不能只是通过 HMC 将新的 solrIndexedProperty 添加到 solrIndexedType 并希望它会起作用,它不会起作用,因为您必须维护一些其他点:

    1. 如果您的新属性是一个复杂对象,例如(Brand、Price、Unite...),您必须创建一个 Value Provider 将该对象转换为简单的原始数据(字符串、 int, double,...) 并将其发送到 solr 以进行索引,例如 Brand 到 Brand.name 和 Price 到 Price.formattedValue...
    2. 然后您必须通过 FacetPopulator 将新的 solrIndexedProperty 值公开到前端。

    【讨论】:

      【解决方案3】:

      要添加更多产品属性,如品牌、名称、any_other_attribute,您应该转到:

      HMC>系统>构面搜索>索引类型

      。用空白字段搜索。

      现在选择<Index TYPE> 喜欢**产品。现在您可以在表格中查看所有产品属性。它们周围还有一些复选框。

      这些是产品内部属性的搜索设置。

      【讨论】:

        【解决方案4】:

        最好的方法是查看开箱即用的内容,例如在电子商店下,打开文件 /electronicsstore/resources/electronicsstore/import/sampledata/stores/electronics/solr.impex

        你会在里面找到 facet 定义,例如这是 Megapixles 的 facet 定义:

        INSERT_UPDATE SolrIndexedProperty;solrIndexedType(identifier) unique=true];name[unique=true];type(code);sortableType(code);currency[default=false];localized[default=false];multiValue[default=false];facet[default=false];facetType(code);facetSort(code);priority;visible;fieldValueProvider;customFacetSortProvider;rangeSets(name);$classAttributeAssignment
        ;electronicsProductType;Megapixel, 63          ;double;; ;    ; ;true;MultiSelectOr;Custom;1000;true;commerceClassificationPropertyValueProvider;numericFacetSortProviderDesc;MegaPixelRange;57:::Megapixel, 63::::
        

        您需要记住的是,对于除文字/原子之外的任何自定义类型,您都需要创建自己的提供程序。对于每个基本的文字/原子类型(字符串、双精度、整数、布尔值),commerceClassificationPropertyValueProvider 就足够了。

        【讨论】:

          【解决方案5】:
          有两种方法可以做到这一点 1.Impex: 转到 solr.impex 文件并将 facet(=true) 属性添加到 SolrIndexedProperty 类型标头 例如:INSERT_UPDATE SolrIndexedProperty;solrIndexedType(identifier)[unique=true];name[unique=true];type(code);sortableType(code);currency[default=false];localized[default=false];multiValue[default= false];facet[default=false];facetType(code);facetSort(code);priority;visible;fieldValueProvider;customFacetSortProvider;rangeSets(name);$classAttributeAssignment ;electronicsProductType;Megapixel, 63 ;double;; ; ; ;true;MultiSelectOr;Custom;1000;true;commerceClassificationPropertyValueProvider;numericFacetSortProviderDesc;MegaPixelRange;57:::Megapixel, 63:::: 2.hmc: hmc --> System --> Facet Search --> SolrItemType --> 选择 solritemtype --> 添加 solrindexproperties --> 选择 facet 复选框为 true

          【讨论】:

            猜你喜欢
            • 2016-10-25
            • 1970-01-01
            • 1970-01-01
            • 1970-01-01
            • 2012-10-10
            • 1970-01-01
            • 1970-01-01
            • 2011-06-14
            • 2016-10-01
            相关资源
            最近更新 更多