在黑子轨道上重新索引

编程入门 行业动态 更新时间:2024-10-12 01:28:06
本文介绍了在黑子轨道上重新索引的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我一直试图找出答案,但是找不到解决方案. 一直在尝试从stackoverflow提出的所有建议,但到目前为止都没有奏效.

I have been trying to figure this out, but could not find the solution. Been trying all the suggestion from stackoverflow, but none works so far.

我已经设置了黑子轨道,并且每当我尝试重新建立数据库索引时,它都会向我抛出此错误:

I have setup the sunspot rails, and whenever i tried to reindex the database, its throwing me this error:

rake sunspot:reindex Skipping progress bar: for progress reporting, add gem 'progress_bar' to your Gemfile rake aborted! RSolr::Error::Http: RSolr::Error::Http - 404 Not Found Error: NOT_FOUND URI: localhost:8982/solr/default/update?wt=ruby Request Headers: {"Content-Type"=>"text/xml"} Request Data: "<?xml version=\"1.0\" encoding=\"UTF-8\"?><delete><query>type:TravelAgentAccountUser</query></delete>" Backtrace: /Users/sabri/.rvm/gems/ruby-2.0.0-p594/gems/rsolr-1.0.12/lib/rsolr/client.rb:284:in `adapt_response' /Users/sabri/.rvm/gems/ruby-2.0.0-p594/gems/rsolr-1.0.12/lib/rsolr/client.rb:190:in `execute' /Users/sabri/.rvm/gems/ruby-2.0.0-p594/gems/rsolr-1.0.12/lib/rsolr/client.rb:176:in `send_and_receive' /Users/sabri/.rvm/gems/ruby-2.0.0-p594/gems/sunspot_rails-2.2.0/lib/sunspot/rails/solr_instrumentation.rb:16:in `block in send_and_receive_with_as_instrumentation' /Users/sabri/.rvm/gems/ruby-2.0.0-p594/gems/activesupport-4.0.0/lib/active_support/notifications.rb:159:in `block in instrument' /Users/sabri/.rvm/gems/ruby-2.0.0-p594/gems/activesupport-4.0.0/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /Users/sabri/.rvm/gems/ruby-2.0.0-p594/gems/activesupport-4.0.0/lib/active_support/notifications.rb:159:in `instrument' /Users/sabri/.rvm/gems/ruby-2.0.0-p594/gems/sunspot_rails-2.2.0/lib/sunspot/rails/solr_instrumentation.rb:15:in `send_and_receive_with_as_instrumentation' (eval):2:in `post' /Users/sabri/.rvm/gems/ruby-2.0.0-p594/gems/rsolr-1.0.12/lib/rsolr/client.rb:82:in `update' /Users/sabri/.rvm/gems/ruby-2.0.0-p594/gems/rsolr-1.0.12/lib/rsolr/client.rb:146:in `delete_by_query'/Users/sabri/.rvm/gems/ruby-2.0.0-p594/gems/rsolr-1.0.12/lib/rsolr/client.rb:284:in `adapt_response' /Users/sabri/.rvm/gems/ruby-2.0.0-p594/gems/rsolr-1.0.12/lib/rsolr/client.rb:190:in `execute' /Users/sabri/.rvm/gems/ruby-2.0.0-p594/gems/rsolr-1.0.12/lib/rsolr/client.rb:176:in `send_and_receive' /Users/sabri/.rvm/gems/ruby-2.0.0-p594/gems/sunspot_rails-2.2.0/lib/sunspot/rails/solr_instrumentation.rb:16:in `block in send_and_receive_with_as_instrumentation' /Users/sabri/.rvm/gems/ruby-2.0.0-p594/gems/activesupport-4.0.0/lib/active_support/notifications.rb:159:in `block in instrument' /Users/sabri/.rvm/gems/ruby-2.0.0-p594/gems/activesupport-4.0.0/lib/active_support/notifications/instrumenter.rb:20:in `instrument' /Users/sabri/.rvm/gems/ruby-2.0.0-p594/gems/activesupport-4.0.0/lib/active_support/notifications.rb:159:in `instrument' /Users/sabri/.rvm/gems/ruby-2.0.0-p594/gems/sunspot_rails-2.2.0/lib/sunspot/rails/solr_instrumentation.rb:15:in `send_and_receive_with_as_instrumentation' (eval):2:in `post' /Users/sabri/.rvm/gems/ruby-2.0.0-p594/gems/rsolr-1.0.12/lib/rsolr/client.rb:82:in `update' /Users/sabri/.rvm/gems/ruby-2.0.0-p594/gems/rsolr-1.0.12/lib/rsolr/client.rb:146:in `delete_by_query' /Users/sabri/.rvm/gems/ruby-2.0.0-p594/gems/sunspot-2.2.0/lib/sunspot/indexer.rb:57:in `remove_all' /Users/sabri/.rvm/gems/ruby-2.0.0-p594/gems/sunspot-2.2.0/lib/sunspot/session.rb:181:in `block in remove_all' /Users/sabri/.rvm/gems/ruby-2.0.0-p594/gems/sunspot-2.2.0/lib/sunspot/session.rb:181:in `each' /Users/sabri/.rvm/gems/ruby-2.0.0-p594/gems/sunspot-2.2.0/lib/sunspot/session.rb:181:in `remove_all' /Users/sabri/.rvm/gems/ruby-2.0.0-p594/gems/sunspot-2.2.0/lib/sunspot/session_proxy/abstract_session_proxy.rb:11:in `remove_all' /Users/sabri/.rvm/gems/ruby-2.0.0-p594/gems/sunspot-2.2.0/lib/sunspot/session_proxy/retry_5xx_session_proxy.rb:17:in `method_missing' /Users/sabri/.rvm/gems/ruby-2.0.0-p594/gems/sunspot-2.2.0/lib/sunspot/session_proxy/abstract_session_proxy.rb:11:in `remove_all' /Users/sabri/.rvm/gems/ruby-2.0.0-p594/gems/sunspot-2.2.0/lib/sunspot.rb:468:in `remove_all' /Users/sabri/.rvm/gems/ruby-2.0.0-p594/gems/sunspot_rails-2.2.0/lib/sunspot/rails/searchable.rb:188:in `solr_remove_all_from_index' /Users/sabri/.rvm/gems/ruby-2.0.0-p594/gems/sunspot_rails-2.2.0/lib/sunspot/rails/searchable.rb:207:in `solr_reindex' /Users/sabri/.rvm/gems/ruby-2.0.0-p594/gems/sunspot_rails-2.2.0/lib/sunspot/rails/tasks.rb:58:in `block (4 levels) in <top (required)>' /Users/sabri/.rvm/gems/ruby-2.0.0-p594/gems/sunspot-2.2.0/lib/sunspot/class_set.rb:16:in `each' /Users/sabri/.rvm/gems/ruby-2.0.0-p594/gems/sunspot-2.2.0/lib/sunspot/class_set.rb:16:in `each' /Users/sabri/.rvm/gems/ruby-2.0.0-p594/gems/sunspot_rails-2.2.0/lib/sunspot/rails/tasks.rb:57:in `block (3 levels) in <top (required)>' /Users/sabri/.rvm/gems/ruby-2.0.0-p594/gems/sunspot_rails-2.2.0/lib/sunspot/rails/tasks.rb:69:in `with_session' /Users/sabri/.rvm/gems/ruby-2.0.0-p594/gems/sunspot_rails-2.2.0/lib/sunspot/rails/tasks.rb:19:in `block (2 levels) in <top (required)>' /Users/sabri/.rvm/gems/ruby-2.0.0-p594/bin/ruby_executable_hooks:15:in `eval' /Users/sabri/.rvm/gems/ruby-2.0.0-p594/bin/ruby_executable_hooks:15:in `<main>' Tasks: TOP => sunspot:reindex (See full trace by running task with --trace)

这就是我的gemfile上的内容:

this is what I have on my gemfile:

gem 'sunspot_solr', '~> 2.0.0' gem 'sunspot_rails'

这是在黑子配置上:

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 test: solr: hostname: localhost port: 8981 log_level: WARNING path: /solr/test

真的很感谢您的帮助.

我尝试安装卸载并安装gem.

I have tried to install uninstall and install the gem.

重新启动笔记本电脑.

删除配置,然后重新安装配置.

Delete the config and install again the config.

我运行并停止了solr,仍然无法正常工作.

I run and stop the solr, still wouldnot work.

感谢帮助

推荐答案

您丢失了

path: /solr/development

在开发环境的sunspot.yml配置中.

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

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

更多推荐

在黑子轨道上重新索引

本文发布于:2023-11-28 16:17:55,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1643098.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:黑子   轨道   索引

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!