cancel
Showing results for 
Search instead for 
Did you mean: 

Order of classification attributes retrieved from Solr

Former Member
0 Kudos
171

I have a project where the client wants the attributes of a classification displayed in specific order for products. This will be on the product results page coming from Solr. Going through the code I am unable to determine if there is anything I can do to define the order of the attributes since the indexed properties are placed in a HashMap. Is there a way to enforce the order? It is already set up in the database but the results page uses Solr. For example I have attributes A1, B2, H6 and X1 and I want it displayed in this order: X1, B2, H6, A1 when I get the data from Solr and display on the page. Thank you!

Former Member
0 Kudos

Are A1,B2,H6 etc used as facet on display page?

Former Member
0 Kudos

They are facets for a specific classification and will show up in refinements only for that classification. Thanks!

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello , did you tried to use the attribute customfacetsortprovider ?

Former Member
0 Kudos

I did not - is that for sorting the results? I don't need the results sorted - just the order of the attributes within a product. Thanks

Former Member
0 Kudos

you can use customfacetsortprovider then implements your custom Comparator according the order you want.

take a look a this help page: https://help.hybris.com/6.7.0/hcd/8ba153f886691014925f989160e5c1a7.html

i hope it's helpful ?

:)