在开发服务器上设置 Sphinx?

发布于 2024-09-18 08:18:46 字数 154 浏览 9 评论 0原文

我们正在尝试让 Sphinx 在所有三个数据库中为我们的所有三个服务器(开发、登台和实时)建立索引,将它们分别放入单独的索引中进行测试等。

我的问题是:我们如何在 Codeingniter (PHP) 中设置查询)所以登台和开发服务器调用正确的索引?

提前致谢!

We're trying to get Sphinx to index all three of our servers (development, staging and live) across all three databases, putting them each into seperate indexes for testing etc.

My question is: How do we setup the queries in Codeingniter (PHP) so the staging and development server make calls to the right index?

Thanks in advance!

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

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

发布评论

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

评论(2

苦妄 2024-09-25 08:18:46

我认为在你的配置文件中有一个常量指示它是哪种类型的安装。例如,使用该常量作为索引名称的前缀,例如 dev_Posts 、 sta_Posts 和 live_Posts .. 这些行中的某些内容。因此,您根据该模式创建索引,只需更改常量以反映您想要使用的索引。只是我的2分钱。

i think in your config file have a constant which indicates which type of install it is. For instance and use that constant prefixed to your index names, for instance dev_Posts , sta_Posts and live_Posts .. something on those lines. So you create your indexes as per that pattern and just change the constant to reflect which index you want used. Just my 2 cents.

贩梦商人 2024-09-25 08:18:46

您可以在sphinx api的第二个参数中指定您想要的索引 查询方法

You can specify index that you want in second parameter of sphinx api query method.

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