A stays search has no words
It sounds like web search until you look at the query.
The query is a place, dates and a party size
| Web search | Stays search |
|---|---|
| quiet hotel near the louvre with a balcony: words to match | where: a city or a map area |
| when: check-in and check-out | |
| who: the number of guests | |
| filters: price, room type | |
| device: phone or laptop | |
| no words to match |
Airbnb's 2020 ranking paper says a guest's query typically holds a location, a number of guests, and check-in and check-out dates. The page adds a map area, filters for price or room type, and the device. None of that is text you can match against a listing. So the order has to come from three other places:
- Hard constraints. In the area, free on those dates, big enough for the party. They decide whether a listing is in at all.
- The listing. Its price for those dates, location, quality and reviews.
- The guest. What they've booked before, what they clicked ten minutes ago, and what guests like them book.
The marketplace adds its own twist. Airbnb's KDD 2018 paper names it. The ranking has to serve hosts and guests both. A guest rarely books the same place twice. And a listing can take only one guest for a set of dates.
Hosts get a say too. The main ranker sits among other models, and one of them predicts whether a host will accept the guest's booking request.
The design, in the order you present it
Present the design in this order in the round. The filter comes first: a listing that fails a hard constraint is out at any score.
In the editor, write overlaps(a_in, a_out, b_in, b_out), whether two stays share a night, and eligible(listing, query), the three hard constraints. A listing holds its city, how many it sleeps and its booked stays as (check-in, check-out) pairs, and a query holds a city, check_in, check_out and guests.