新手问题 关于 solr 服务器上 reindex 跑不起来

brucebot · May 02, 2014 · Last by brucebot replied at May 03, 2014 · 3249 hits

Hi,大家好,这两天假期在折腾 solr,在 mac 上本机测试 OK 后,准备发布到服务器上去,无奈碰到问题了,折腾一个上午还是无果,分别重新安装过 tomcat 版本的和 jetty 版本,后来发现可以直接用gem sunspot

情况是这样的

  1. bundle exec rake sunspot:solr:startbundle exec rake sunspot:solr:stop都正常,也可以看到 x.x.x.x:8983/solr的界面,admin 也有
  2. bundle exec rake sunspot:solr:reindex,索引一操作就报错,connection refused.

我的 sunspot.yml 是这样的

production:
  solr:
    hostname: localhost
    port: 8983
    log_level: WARNING
    path: /solr/default
    # read_timeout: 2
    # open_timeout: 0.5

development:
  solr:
    hostname: localhost
    port: 8982
    log_level: INFO
    path: /solr/development

test:
  solr:
    hostname: localhost
    port: 8981
    log_level: WARNING
    path: /solr/test

Gemifle

gem 'sunspot_rails'
gem 'progress_bar'
gem 'sunspot_solr'

updated:

发现 sunspot.yml不起作用,reindex的时候仍然在调用localhost:8080而不是localhost:8983

update: 端口的问题解决了,还是停在 reindex 的问题上

brucebot in rails 使用 sunspot-solr 做搜索「已解决」 mention this topic. 03 Apr 10:57
You need to Sign in before reply, if you don't have an account, please Sign up first.