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