SOLR and complex pricing -


we have property booking site (similar airbnb) lamp setup , relatively simple solr index. user can search by:

  • location
  • guests
  • date in/out

they can filter results specific price range, sort price.

the issue price per night never fixed, , depends on several things such custom prices (for 1 day, or range of days), price per guest, discounts (e.g. weekend discount) etc. 1 example price_per_night might 50$, 10th , 11th of august real price per night 110$ plus 20$ guest fee, minus discount of 30$ particular weekend. on top of this, commissions applied on total amount we'd accurate possible.

while can calculate on server side, of course affects results returned price range sorting (highest price first vs. lowest).

could suggest possible solution?

below example of select:

"docs": [   {     "id": 1,     "property_type": 1,     "room_type": 1,     "minimum_nights": 2,     "maximum_nights": 120,     "location": "41.3902359,2.1685901",     "price_per_night": 210,     ........     "unavailable_days": [       "2016-09-15t00:00:00z",       "2016-09-16t00:00:00z",       ......     ] } 


Comments