So with this kind of data structure, we can handle  phrase queries using a merge algorithm much as we showed before, it's just  a little bit hairier because rather than just doing an intersection of the document IDs, we have to do this sort of 2-level algorithm, where we both intersect the document IDs and  then also check that there are compatible positions for the words occurring in the phrase. 