title: How to search phrase queries in inverted index structure?
body: <p>If we want to search a query like this "t1 t2 t3" (t1,t2 ,t3 must be queued) in an inverted index structure , 
  which ways should we do ?</p>
  
  <p>1-First we search the "t1" term and find all documents that contains "t1" , then do this work for "t2" and then "t3" . Then find documents that positions of "t1" , "t2" and "t3" are next to each other .</p>
  
  <p>2-First we search the "t1" term and find all documents that contains "t1" , then in all documents that we found , we search the "t2" and next , in the result of this , we find documents that contains "t3" .</p>
  
  <p>I have a full inverted index . I want to know which ways above is optimized , (1) or (2) ?</p>
  
  <p>thanks a lot.</p>