Say you have a website for users to search for "hotel rooms for rent".
I don't know how the logics of current systems work, which is why I am asking you guys.
I currently have two fields in the form:
Date available from: //example 2010-04-01 // 1st april 2010
Date available to: //example 2010-05-01 // 1st may 2010
Then Submit!
Here comes my problem: My search engine is called "Solr" and it searches like this:
dateFrom:[$date_from TO *] AND dateTo:[* TO $date_to]
// $date_from and $date_to = the date inputted by the user in the html form
the above would search for all matches where $date_from TO infinite AND infinite TO $date_to.
Is this correct? I don't think so personally...
How does this logic work on booking sites?
If you need more input let me know! Thanks
UPDATE:
Btw, whenever users specify a "room for rent" they specify a range, example from 1st of march TO 1st of april.
Also as an example: Say we have a room which is free between 1st april TO 1st may.