使用 Ruby-on-Rails、Sphinx 或 UltraSphinx 以及 HTML 源(不是数据库)

发布于 2024-07-29 18:22:52 字数 190 浏览 10 评论 0原文

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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

剩一世无双 2024-08-05 18:22:52

您是否正在寻找 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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文