使用 Ruby-on-Rails、Sphinx 或 UltraSphinx 以及 HTML 源(不是数据库)
sphinx-0.9.9-rc2 的文档说明:
要索引的数据通常可以来自非常不同的来源:SQL 数据库、纯文本文件、HTML 文件、邮箱等。
但是,除了 SQL 之外,我找不到任何有关设置源的文档。 配置文件似乎没有表明源可以是数据库之外的任何东西。 有人有任何有用的链接来使用 HTML 源设置 sphinx 吗?
The documentation states for sphinx-0.9.9-rc2:
The data to be indexed can generally come from very different sources: SQL
databases, plain text files, HTML files, mailboxes, and so on.
However, I can't find any documentation on setting up a a source besides SQL. The config file doesn't seem to indicate that the source can be anything but a database. Anyone have any helpful links for setting up sphinx with an HTML source?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您是否正在寻找 Sphinx 上的 xmlpipe(现在称为 xmlpipe2)功能? 我已经针对 XML 文件尝试过它,它的工作方式就像针对 SQL 一样。
我还没有尝试使用普通 HTML 文件来使用 Sphinx,所以我猜您需要解析您的 HTML 文件并使用您想要索引的属性/字段创建 XML 文件,并使用 xmlpipe 将它们提供给 Sphinx。
您可以在此处和此处了解更多信息。
华泰
Are you looking for the xmlpipe (now called xmlpipe2) feature on Sphinx? I've tried it out for XML files and it works just like it does for SQL.
I haven't tried out Sphinx with vanilla HTML files, so I'm guessing you'll need to parse your HTML file and create XML files with the attributes/fields that you want indexed and feed them to Sphinx using xmlpipe.
You can see here and here for more.
HTH