Daily I have 5 million or so unique keywords with an impression count for each one. I want to be able to look these keywords up by certain words so for instance if I have "ipod nano 4GB" I want to be able to pull that out if I search for "ipod", "nano", or "4GB". mySQL can't seem to handle that much data for what I want, I've tried Berkeley but that seems to crash with too many rows and it's slower. Ideas?
问问题
218 次
5 回答
2
我对 Xapian 搜索引擎库非常满意。虽然听起来这对您的场景来说可能有点矫枉过正,但也许您只是想将数据放入一个大哈希表中,比如memcached?
于 2009-06-16T20:18:54.067 回答
1
you can try free text on mssql. http://msdn.microsoft.com/en-us/library/ms177652.aspx
Example query:
SELECT TOP 10 * FROM searchtable
INNER JOIN FREETEXTTABLE(searchtable, [SEARCH_TEXT], 'query string') AS KEY_TBL
ON searchtable.SEARCH_ID = KEY_TBL.[KEY]
ORDER BY KEY_TBL.RANK DESC
Josh
于 2009-06-16T20:02:15.023 回答
1
Lucene索引可能会起作用。我以前用它来处理相当大的数据集。它是用 java 开发的,但也有一个 .NET 版本。
于 2009-06-16T20:04:30.820 回答
0
您是否尝试过在 MySQL 中进行全文搜索?因为如果你用 LIKE 比较来尝试它,我明白为什么它很慢:)。
于 2009-06-16T20:23:33.950 回答
0
这种工作负载和搜索模式对于 PostgreSQL 来说是微不足道的,因为它具有集成的全文搜索功能(从 8.4 开始集成,现在处于 RC 状态。在此之前它是一个 contrib 模块。)
于 2009-06-18T14:06:14.220 回答