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拆分为多个部分,以便轻松搜索?