【问题标题】:Sphinx fails to reindex on HerokuSphinx 未能在 Heroku 上重新索引
【发布时间】:2021-05-26 22:41:52
【问题描述】:

我有一个使用以下内容的 Rails 应用程序: 狮身人面像 2.2.11-id64-release (95ae9a6) 思考狮身人面像 4.4.1 会飞的狮身人面像 1.2.0

目前,我能够成功地在开发中重新索引 (rake ts:rebuild)。当我这样做时,我看到它生成了 development.sphinx.conf。当我将其推送到 heroku 上时,我运行相同的命令并得到:

I, [2021-05-26T22:25:17.260156 #4]  INFO -- : [RailsAutoscale] Preparing middleware
D, [2021-05-26T22:25:17.404021 #4] DEBUG -- :    (1.5ms)  SET NAMES utf8,  @@SESSION.sql_mode = CONCAT(CONCAT(@@sql_mode, ',STRICT_ALL_TABLES'), ',NO_AUTO_VALUE_ON_ZERO'),  @@SESSION.sql_auto_is_null = 0, @@SESSION.wait_timeout = 2147483
searchd is not currently running.
D, [2021-05-26T22:25:17.988676 #4] DEBUG -- :    (2.5ms)  SET NAMES utf8,  @@SESSION.sql_mode = CONCAT(CONCAT(@@sql_mode, ',STRICT_ALL_TABLES'), ',NO_AUTO_VALUE_ON_ZERO'),  @@SESSION.sql_auto_is_null = 0, @@SESSION.wait_timeout = 2147483
Generating configuration to /app/config/staging.sphinx.conf
Generating configuration to /app/config/staging.sphinx.conf
sh: 1: indexer: not found

The Sphinx indexing command failed:
  Command: indexer --config "/app/config/staging.sphinx.conf" --all
  Status:  127
  Output:  See above

There may be more information about the failure in /app/log/staging.searchd.log.

我查找了日志,但找不到。我所知道的是没有生成暂存配置文件。如果有人有任何线索可以指出我解决此问题,我将永远感激不尽。

【问题讨论】:

    标签: ruby-on-rails sphinx thinking-sphinx reindex


    【解决方案1】:

    我认为您使用的 gem 可能比文档预期的要旧。对于flying-sphinx v1.x,您需要使用flying-sphinx 可执行文件而不是ts:-prefixed rake 任务:heroku run bundle exec flying-sphinx rebuild

    如果您升级到 fly-sphinx v2.x,那么您将能够在 Heroku 以及本地使用 ts rake 任务。 (是的,这从一开始就是理想的行为,但迟到总比没有好!)

    【讨论】:

    • 这是一个很好的线索!试试看是不是这个问题。我很感激。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-10-03
    • 2011-04-18
    • 1970-01-01
    • 1970-01-01
    • 2016-02-24
    相关资源
    最近更新 更多