on 08-23-2017 8:31 PM
Hi All, I am new to hybris, there is a requirement to sort in the solr facet Ex: Daily,Eeekly Monthly and Yearly like this instead of ascending or descending. Please help me to complete this implementation
Follow this code. In fitAttributeComparator put ur values. put this fitAttributeSortProvider in solr impex as customSortProvider.
<bean id="fitAttributeSortProvider" class="de.hybris.platform.solrfacetsearch.config.impl.DefaultFacetSortProvider">
<property name="comparator" ref="fitFacetAttributeComparator"/>
</bean>
<bean id="fitFacetAttributeComparator" class="de.hybris.platform.acceleratorservices.search.comparators.FacetValueNameComparator">
<property name="comparator" ref="fitAttributeComparator"/>
</bean>
<bean id="fitAttributeComparator"
class="de.hybris.platform.acceleratorservices.search.comparators.SizeAttributeComparator">
<property name="pattern" value="[0-9]+(\.[0-9])*"/>
<property name="sizeSystems">
<list>
<value>Small</value>
<value>Small_Medium</value>
<value>Medium</value>
<value>Medium_Large</value>
<value>Large</value>
</list>
</property>
</bean>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
5 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.