将 Sphinx 或其他搜索引擎与 Question2Answer 集成
查看 Question2Answer 源代码后,我的第一印象是它似乎是为了与其他操作系统应用程序良好共存而构建的。例如,可以插入自己的代码来进行用户数据库管理或本地化 - 例如,如果想使用 gettext 而不是 PHP 数组来处理多语言消息(即使它只是填充代码,而不是某种基于 OO 模式的样式 - 但是这是另外一回事)。
然而,似乎没有预先设计允许插入搜索功能。 我的问题是:如果有人将 sphinx 搜索引擎集成到 Question2Answer 中,那么实现这一目标的最佳技术或技巧是什么。
我在这里检查了有关创建插件的文档: http://www.question2answer.org/plugins.php,并且插件系统似乎适应某些类型的功能,例如事件处理程序或内容小部件 - 但不是通用功能或专门的搜索模块。
My first impression from peeking into the source for Question2Answer is that it seems to be built to co-exist nicely with other OS applications. For example, one can plug in their own code for user database management or for localization - for example if one wanted to use gettext instead of PHP arrays for multilingual messages (even though it's just code filling in, not some OO pattern based style - but that's a different matter all together).
However, there does not seem to be a pre design to allow plugging in search functionality. My question is: if anyone has integrated the sphinx search engine into Question2Answer, then what is the best technique or tips to achieve that.
I checked the docs on creating plugins here: http://www.question2answer.org/plugins.php, and the plugins system seems to accommodate certain types of functionality such as event handlers or content widgets - but not generic functionality or a search module specifically.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Question2Answer 1.5 版将支持插件中的搜索模块,允许您实现自定义索引器和搜索引擎。
Version 1.5 of Question2Answer will support search modules in plugins which allow you to implement a custom indexer and search engine.