Why if you select a product in filter, it's changing order ?

50 views
Skip to first unread message

Artemie .Alexsndr

unread,
May 5, 2016, 7:29:56 AM5/5/16
to django-oscar
Can someone explain me why this is happening - ordinary set http://i.imgur.com/EaDcc9V.png?2 Common is down, and when i select it http://i.imgur.com/ObfzssL.png?1, common goes up ? Why it is changing order and how can this be fixed ? pls can someone explain that

Sergey Maranchuk

unread,
May 7, 2016, 3:41:19 PM5/7/16
to django-oscar

i'm not sure, but you can try add sort `option` to OSCAR_SEARCH_FACETS:
if it solr:

...
 ('product_class', {'name': _('Type'), 'field': 'product_class', 'options': {'sort': 'index'}}),


for elastic:
'options': {'order': 'term'}



четверг, 5 мая 2016 г., 14:29:56 UTC+3 пользователь Artemie .Alexsndr написал:

Artemie .Alexsndr

unread,
May 9, 2016, 9:02:34 AM5/9/16
to django-oscar
Надеюсь ты русский понимаешь, проблема не в том чтобы сортировать элементы, а в том что при выборе элемента - Solr срабатывает и отсылает этот элемент на начальный индекс [0] ! Зачем он это делает я не пойму, но таким образом поля - туда суда дергаются при выборе http://i.imgur.com/EaDcc9V.png?2 http://i.imgur.com/ObfzssL.png?1 на скриншотах это видно !

ENG:
The problem its not in adding new facets, but its in the way Solr treat those facets, if you select it, it move that facet from its position in data array(it could be 3 6 9) to beginning  of array [0], Idk why its making it that way, but i result is sick - it moves the elems up and down  http://i.imgur.com/EaDcc9V.png?2http://i.imgur.com/ObfzssL.png?1
суббота, 7 мая 2016 г., 22:41:19 UTC+3 пользователь Sergey Maranchuk написал:
Reply all
Reply to author
Forward
0 new messages