This is a feature request.
Has anyone thought of implementing an Availability feature in Algolia somehow. Lets say if your "room" was booked next week, and I add a search time, I would filter that room out.
Any thoughts or ideas how something like this could be done? My mind is going to an parse-able availability string, and then some sort of custom ranking.
Thanks!
You could have a record structure like this:
{
"available": [
{ "from": 123123, "to": 123124 },
{ "from": 123125, "to": 123126 }
]
}
Then you can use the filters attribute (not in instantsearch.js, but in the js client) to filter based on a period between those.
This is obviously a quite complicated feature, so we might want to implement this in instantsearch if there's a lot of request for it.
Let me know if you need more than an overview
Awesome @Haroenv.
Could you show me a rough logic example of that filter query based on something similar?
As my time would be from-to and comparing that with algolia might be difficult.
{
"not-available": [
{ "from": 123123, "to": 123124 },
{ "from": 123125, "to": 123126 }
]
}
my request "are you not available"
from: 123127 to 123129
oh you're right @jaarkko, it's more complicated than it first seemed, I'd need to sync with someone on this.
This is more on the engine side that this could be solved, and it's not high in the list. There is a way but it requires to compute combinations of possible bookings as different records, this could have a huge impact on the number of records in your index.
I have forwarded your feedback though :)
Just popping up and asking if anyone has any ideas on this, ping here. Would help a lot of people!
@jaarkko Can you go through support to ask about that? There are some solutions but there are no one-size-fits-all kinda solution. If you go through support and mention that you want to implement a booking search then we can start talking about a solution tailored for your use case.