[Google] URL query with wild card

In our indexes, we have millions of URLs each of which has a link to the
page content, now, suppose a user type a query with wild cards *, which
represent 0 or multiple occcurrences of any characters, how to build the
index such that such a type of query can be executed efficiently and the
contents of all correpsonding URLs can be displayed to the users? For
example, given a query http://www.*o*ve*ou.com. You man need to find iloveyou.com, itveabcu.com, etc.

[Thoughts]
use a Trie and traverse through are trie and for each * traversing to all the children of the node...

posted on 2013-02-03 07:19  小刀初试  阅读(110)  评论(0编辑  收藏  举报