title: Conditional "OR" in thinking sphinx search with filtering by date range
body: <p>I have problem with connecting conditional OR with filterint by date range.
  Something like that</p>
  
  <pre><code>#pseudo SQL syntax
  (@date_start &lt; params[:date_to_search] &lt; @date_end) &amp;&amp; (@every_day==1 || @day_of_week== params[:day])
  </code></pre>
  
  <p>--</p>
  
  <pre><code>class OfferTime &lt; ActiveRecord::Base
    define_index do
      indexes every_day #boolean
      indexes day_of_week #string eg. Tue, Mon etc
  
      has date_start #Date NOT datetime
      has date_end #Date
    end
  end
  </code></pre>
  
  <p>To make conditional OR I use this solution:
  <a href="https://stackoverflow.com/questions/5624775/conditional-or-in-thinking-sphinx-search">Conditional &quot;or&quot; in Thinking Sphinx search</a></p>
  
  <p>This works quite well.</p>
  
  <pre><code>(OfferTime.search "@every_day 1 | @day_of_week Tue", :match_mode =&gt; :extended).size 
  # =&gt; 2
  # Correct answer
  </code></pre>
  
  <p>But I don't know how to connect that with that date range</p>
  
  <pre><code>(@date_start &lt; params[:date_to_search] &lt; @date_end)
  </code></pre>
  
  <p>Example:</p>
  
  <pre><code>(OfferTime.search "@every_day 1 | @day_of_week Tue &amp; @date_start &lt; #{1.year.ago}", :match_mode =&gt; :extended).size 
  # =&gt; 1
  # wrong answer! should be 0!
  </code></pre>
  
  <p>Is it possible to make that with ThinkingSphinx?</p>