Hi, we are using SOLR to power a sale listing page where each product has an availability and a position in the sale. We would like SOLR to partition the products based on their sold_out={true|false} state and to sort the two partitions by product position.
We started with appending to the query two sort functions: (i) inventory(product_id): int returning 0 if the product is SOLD_OUT and the *sku_sale_look_position* to capture the position of the product in a particular sale. We ended up by appending the following to the query: &sort=inventory(id,sku_product_id)+desc,sku_sale_look_position+asc&debug=true' and it worked fine. However, we have been told that for performance reasons is better to boost docs based on these two functions thus we introduced these in our solrconfig.xml: <str name="boost">inventory(id,sku_product_id)</str> <str name="boost">recip(sku_sale_look_position, 1, 1, 1)</str> While these are working fine (same ordering of the first approach) in SOLR3.6 they stopped to work properly in SOLR4.+ Has something changed in how SOLR uses boosting between SOLR3.6 and SOLR4+ ?? Is boosting the best way to achieve our particular sorting requirement ?? Regards and thank you, Ugo