Search code examples
pythondjangosolrdjango-oscar

How to disable Solr from reordering data


Is it possible to disable Solr from moving selected feacets(in filter), on first index ?

As for now if i select an element (product class) in my menu filter image (that is being returned from solr search engine)

It return that element on first position - image , but originaly that element(classic) was on the last position

Is it possible to fix that ?


Solution

  • You haven't shown your Solr query, but most likely you are seeing facets sorted by the counts which change as you narrow your query. You can sort lexicographically instead with facet.sort=index parameter.

    This parameter can be set in the query or in the solrconfig.xml on the request handler.