title: Reactive Extensions Switch() in search
body: <p>Classic live search example:</p>
  
  <pre><code>var searchResults = from input in textBoxChanged
                      from results in GetDataAsync(input)
                      select results;
  </code></pre>
  
  <p>GetDataAsync returns a:</p>
  
  <pre><code> Task&lt;List&lt;DataRecord&gt;&gt;
  </code></pre>
  
  <p>Here is obviously a race condition so if the search triggered by the second input returns before the first one, the results from the first input comes after and therefore gives me the wrong data.</p>
  
  <p>I keep reading everywhere that the .Switch() operator will magically solve this, but how?</p>
  
  <p>.Switch() only exists on:</p>
  
  <pre><code> IObservable&lt;IObservable&lt;T&gt;&gt;
  </code></pre>