我在SOLA的QA环境中获得404

时间:2015-01-19 10:56:59

标签: ruby-on-rails solr sunspot-rails sunspot-solr

我一直在尝试在我的QA机器上设置我的solr服务器。但是我无法搜索或重新索引

当我运行bundle exec rake sunspot:solr:index时,它不会给我任何错误。

但是当我尝试Model.solr_index时,它给了我一个错误的404。

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

development:
  solr:
    hostname: localhost
    port: 8982
    log_level: INFO
    solr_home: /opt/solr/solr-4.10.2/example/solr
    path: /solr/collection1

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



D, [2015-01-19T01:50:55.293459 #6875] DEBUG -- :   SOLR Request (13.3ms)  [ path=update parameters={} ]
RSolr::Error::Http: RSolr::Error::Http - 404 Not Found
Error:     Not Found

Request Data: "<?xml version=\"1.0\" encoding=\"UTF-8\"?><add><doc><field name=\"id\">Submission 26</field><field name=\"type\">Submission</field><field name=\"type\">ActiveRecord::Base</field><field name=\"class_name\">Submission</field><field name=\"status_b\">false</field><field name=\"category_id_i\">30</field><field name=\"created_at_d\">2015-01-09T11:20:07Z</field><field name=\"title_text\">Crime Tip</field><field name=\"desc_text\">test</field><field name=\"address_text\">3600 US Highway 1, Princeton‎ NJ‎ 08540, United States</field></doc><doc><field name=\"id\">Submission 27</field><field name=\"type\">Submission</field><field name=\"type\">ActiveRecord::Base</field><field name=\"class_name\">Submission</field><field name=\"status_b\">true</field><field name=\"category_id_i\">32</field><field name=\"created_at_d\">2015-01-09T15:55:14Z</field><field name=\"title_text\">Pothole</field><field name=\"desc_text\">test</field><field name=\"address_text\">3600 U.S. 1 Princeton, NJ 08540</field></doc><doc><field name=\"id\">Submission 28</field><field name=\"type\">Submission</field><field name=\"type\">ActiveRecord::Base</field><field name=\"class_name\">Submission</field><field name=\"status_b\">false</field><field name=\"category_id_i\">34</field><field name=\"created_at_d\">2015-01-09T16:10:17Z</field><field name=\"title_text\">Road Kill</field><field name=\"desc_text\">road kill</field><field name=\"address_text\">300 Carnegie Center Dr Princeton, NJ 08540</field></doc><doc><field name=\"id\">Submission 31</field><field name=\"type\">Submission</field><field name=\"type\">ActiveRecord::Base</field><field name=\"class_name\">Submission</field><field name=\"status_b\">true</field><field name=\"category_id_i\">32</field><field name=\"created_at_d\">2015-01-15T14:14:02Z</field><field name=\"title_text\">Pothole</field><field name=\"desc_text\">pothole</field><field name=\"address_text\">300 Carnegie Center Dr Princeton, NJ 08540</field></doc><doc><field name=\"id\">Submission 32</field><field name=\"type\">Submission</field><field name=\"type\">ActiveRecord::Base</field><field name=\"class_name\">Submission</field><field name=\"status_b\">false</field><field name=\"category_id_i\">29</field><field name=\"created_at_d\">2015-01-19T06:33:51Z</field><field name=\"title_text\">Suspicious Activity</field><field name=\"desc_text\">Suspicious bag found at train.</field><field name=\"address_text\">Boomrang, Mumbai-400072</field></doc></add>"

Backtrace: /usr/local/lib/ruby/gems/2.1.0/gems/rsolr-1.0.10/lib/rsolr/client.rb:283:in `adapt_response'
/usr/local/lib/ruby/gems/2.1.0/gems/rsolr-1.0.10/lib/rsolr/client.rb:190:in `execute'
/usr/local/lib/ruby/gems/2.1.0/gems/rsolr-1.0.10/lib/rsolr/client.rb:176:in `send_and_receive'
/usr/local/lib/ruby/gems/2.1.0/gems/sunspot_rails-2.1.1/lib/sunspot/rails/solr_instrumentation.rb:16:in `block in send_and_receive_with_as_instrumentation'
/usr/local/lib/ruby/gems/2.1.0/gems/activesupport-4.1.5/lib/active_support/notifications.rb:159:in `block in instrument'
/usr/local/lib/ruby/gems/2.1.0/gems/activesupport-4.1.5/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/usr/local/lib/ruby/gems/2.1.0/gems/activesupport-4.1.5/lib/active_support/notifications.rb:159:in `instrument'
/usr/local/lib/ruby/gems/2.1.0/gems/sunspot_rails-2.1.1/lib/sunspot/rails/solr_instrumentation.rb:15:in `send_and_receive_with_as_instrumentation'
(eval):2:in `post'

任何想法?为什么会这样。

我认为这可能存在一些问题。

    solr_home: /opt/solr/solr-4.10.2/example/solr
    path: /solr/collection1

0 个答案:

没有答案