我已經創建了3個屬性:popularity
,reviews_count
和pm_flat_volume
。Magento中的SOLR排序問題
這3個屬性包含數值(int)。 我已經在Solr的schema.xml
定義了以下動態字段:
- reviews_count = BY DESC/ASC排序:
<dynamicField name="attr_sort_reviews_count_*" type="sint" indexed="true" stored="true"/> <dynamicField name="attr_sort_pm_flat_volume_*" type="sint" indexed="true" stored="true"/> <dynamicField name="attr_sort_popularity_*" type="sint" indexed="true" stored="true"/>
在 「索引管理」 遇到下面的結果刷新字段後工作適當
- 普及=由降序/升序排序:正常工作
- pm_flat_volume =由降序/升序排序:不正常(*)
(*)如果餘有[1,54,2,3,91,87,100]
ASC = [1, 100, 2, 3, 54, 87, 91] it should be [1, 2, 3, 54, 87, 91, 100]
DESC = [91, 87, 54, 3, 2, 100, 1] it should be [100, 91, 87, 54, 3, 2, 1]
我曾嘗試不同的方法,但其中沒有工作。我再說一遍,所有這3個屬性都具有相同的配置。
謝謝!
你可以嘗試使'pm_flat_value'類型的常規'int'和reindex? – Archer
奇怪的''sint'應該排序正確:http://markmail.org/message/ib4gevqevjilqz7n。嘗試從Solr admin打開你的schema.xml,看看你的字段是什麼類型。 – Zyava
@archer:排序不正確,既不是sint或int – user1986414