将 Sphinx 2.0(或 1.1)与 DataMapper 结合使用的选项?

发布于 2024-11-09 06:44:35 字数 578 浏览 0 评论 0原文

不幸的是 ThinkingSphinx 不是 DataMapper 的一个选项(尽管他们说支持已计划)。我们正在使用实时索引,因此我们至少需要 Sphinx 1.1 版本(我们实际上运行的是 2.0 版本,但 1.1 应该仍然可以正常工作)。我见过 dm-sphinx-adapter,但它看起来没有维护,非常像黑客(您手动提取 ID,然后正常搜索......这让我想知道适配器甚至提供什么)。

还有什么我可能没看到的吗? :)

编辑|嗯,实际上,某人的 dm-sphinx-adapter 分支 有一个更好的自述文件,它提供了一些选项。使用 is :searchable 插件会让事情变得更好一些。但我仍然热衷于看到更多具有性感 API 的选项,该 API 经过很好的抽象以更符合标准 DataMapper 约定。

编辑2 | dm-sphinx-adapter 是一个死项目。由于 Riddle(ThinkingSphinx 使用的纯 ruby​​ 客户端)是开源的,我想我将开始编写自己的客户端。看起来外面什么也没有。

Unfortunately ThinkingSphinx is not an option for DataMapper (though they say support is planned). We're using Realtime Indexes, so we need at least Sphinx version 1.1 (we're actually running version 2.0, but 1.1 should still work fine). I've seen dm-sphinx-adapter, but that looks unmaintained and very much like a hack (you pull out the IDs manually, then search as normal... which makes me wonder what the adapter is even offering).

Anything else I may not have seen? :)

EDIT | Hmm, actually, somebody's fork of dm-sphinx-adapter has a nicer README that gives some options. Using the is :searchable plugin makes things a bit nicer. But I'm still keen to see more options with a sexy API that's nicely abstracted to fit more with standard DataMapper conventions.

EDIT 2 | dm-sphinx-adapter is a dead project. Since Riddle (the pure-ruby client that ThinkingSphinx uses) is open source, I think I'll set about writing my own. Doesn't look like there's anything out there.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(2

爱的故事 2024-11-16 06:44:35

我将 Thinking Sphinx 的(非常旧的)dm 分支推送到了 git另一周回购 - 分支本身已有大约 18 个月的历史。 DataMapper 不像 ActiveRecord 那样对多次连接同一个表提供可靠的支持,因此很难拥有相同的功能集和可靠性 - 这就是为什么此后该分支一直没有被触及的原因。

如果您想尝试复活它,请成为我的客人 - 考虑到您在墨尔本(通常我也是),甚至很乐意坐下来讨论代码。

即使从里德尔的角度来看,同样的提议也适用。

就目前而言,Riddle 的 2.0.x 功能支持并不十分完美,但从今晚晚些时候开始,我将在航班上花费 20 多个小时,而 RT Index 支持(通过 SphinxQL)已在我的飞机黑客项目列表中。不过,我们会看看我的表现。

I pushed a (very old) dm branch for Thinking Sphinx to the git repo the other week - the branch itself is about 18 months old. DataMapper doesn't have as solid support for joining to the same table multiple times as ActiveRecord does, so it was really hard to have the same featureset and reliability - which is why the branch hasn't been touched since.

If you want to have a go at resurrecting it, be my guest - and given you're in Melbourne (as am I, usually), happy even to sit down and talk through code.

Even from a Riddle perspective, the same offer applies.

As it currently stands, Riddle's 2.0.x feature support isn't quite perfect, but I'm about to spend 20+ hours on flights from later tonight, and RT Index support (via SphinxQL) is on my list of plane hacking projects. We shall see how I go, though.

对你而言 2024-11-16 06:44:35

我最终(几个月后)创建了俄狄浦斯和俄狄浦斯-dm:

https://github.com/d11wtq/ oedipus-dm

我们成功地将其与 RT 索引结合使用。然而,我们还有很多事情要做。

I ended up (many months later) creating oedipus and oedipus-dm:

https://github.com/d11wtq/oedipus-dm

We are using this successfully with our RT indexes. We still have a lot to do, however.

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