2011-10-11 64 views
0

使用PostgreSQL时,您可以在使用全文搜索时将URL分割为几个不同的词位。例如:Sphinx如何处理URL

SELECT to_tsvector('http://www.example.com/dir/page.html'); 
           to_tsvector         
-------------------------------------------------------------------------- 
'/dir/page.html':3 'www.example.com':2 'www.example.com/dir/page.html':1 
(1 row) 

你可以看到的PostgreSQL已经打破了http://www.example.com/dir/page.html到URL(www.example.com/dir/page.html),主机(www.example.com)和url_path(/dir/page.html)。这很方便,因为它可以让你快速搜索www.example.com

在这样的背景下,SphinxSearch如何处理索引URL?它的行为与PostgreSQL类似吗?它将URL拆分为多个部分,以便轻松搜索?

回答

0

它真的只是打破了使用charset_table里

没有上市所以通常任何charactors源文本。和/只是算作分隔符,这样一个url就可以被字母组搜索 - 有用地与短语运算符