on 2018 Jun 21 6:25 PM
Hi Experts,
My requirement is that certain products should always come at last when solr sorting of price is applied irrespective of whether Highest or Lowest filter selected.
Just fyi, these certain product do not have any price or they will have Zero price.
Is it possible to do it via SOLR configuration?
Thanks in advance.
Request clarification before answering.
It is possible with SOLR schema configuration, only if products do not have price, add attribute sortMissingLast="true" in the schema for price field or its field type
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi ,
I have a similar requirement,did you find any solution to exclude products in solr sorting?
Thanks,Anusha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Anusha,
Yes. For this you need to update "schema.xml" file of SOLR. In this file, you need to add sortMissingLast="true" for the field type that you are using to index price. For example, if you are indexing price as type double, look for fieldType name="double" in schema.xml file and add sortMissingLast="true" there.
Note: This will work only if price is null.
Restart solr and reindex.
| User | Count |
|---|---|
| 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.