i've got solr instance containing variable product prices powers site search. search around date , show results if exact requested date not available, use query this:
product_id: 759 , arrival_date:[2016-05-20t00:00:00z-3days 2016-05-20t00:00:00z+3days]
the results grouped
product_id
. grouping inherits price asc
sorting order main query.
this, unfortunately, has negative side effect of returning documents lowest price, regardless of date, if requested date is available.
how can sort within group proximity date?
use group.sort=arrival_date desc
alternatively if want sort results based on date first price &sort=date desc,price asc
Comments
Post a Comment