How to search phrase queries in inverted index structure?
Posted
by Mehdi Amrollahi
on Stack Overflow
See other posts from Stack Overflow
or by Mehdi Amrollahi
Published on 2010-04-17T16:33:39Z
Indexed on
2010/04/17
17:23 UTC
Read the original article
Hit count: 375
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 could we do ?
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 .
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" .
thanks .
© Stack Overflow or respective owner