> --
> You received this message because you are subscribed to the Google Groups
> "Blacklight Development" group.
> To post to this group, send email to
> blacklight-...@googlegroups.com.
> To unsubscribe from this group, send email to
> blacklight-develo...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/blacklight-development?hl=en.
>
If you still have trouble, using the raw RSolr connection (`Blacklight.solr`) may help you track things down. Here are some things I'd look at:
irb(main):001:0> Blacklight.solr
=> #<RSolr::Client:0xb6a389f8 @connection=#<RSolr::Connection:0xb6a42c64>, @options={:url=>"http://127.0.0.1:8180/solr/development/"}, @uri=#<URI::HTTP:0xb6a2dc38 URL:http://127.0.0.1:8180/solr/development/>>
irb(main):002:0> Blacklight.solr.ping
=> {"responseHeader"=>{"QTime"=>2, "params"=>{"echoParams"=>"all", "qt"=>"standard", "q"=>"solrpingquery", "wt"=>"ruby"}, "status"=>0}, "status"=>"OK"}
irb(main):003:0> Blacklight.solr.connection
=> #<RSolr::Connection:0xb6a42c64 @http=#<Net::HTTP 127.0.0.1:8180 open=false>>
irb(main):004:0> Blacklight.solr_config
=> {:url=>"http://127.0.0.1:8180/solr/development/"}
irb(main):005:0> RAILS_ENV
=> "development"
Chris
Blacklight.solr.select :params => {:q => "*:*", :rows => 0}
http://dev.fedapps.toldark.com.au:80/solr/select/q=*:*
http://dev.fedapps.toldark.com.au/solr/select/q=*:*
Can you also try with curl:... exec in your shell:
curl "http://dev.fedapps.toldark.com.au:80/solr/select/q=*:*"
curl "http://dev.fedapps.toldark.com.au/solr/select/q=*:*"
Can you tell me how you're starting solr?
Matt
On Thu, May 19, 2011 at 10:19 PM, Janna Wemekamp
<janna.w...@gmail.com> wrote:
>>> rsolr = RSolr.connect(:url =>
>>> "http://dev.fedapps.toldark.com.au:80/solr/")
> => #<RSolr::Client:0x2b34580ed780 @uri=#<URI::HTTP:0x2b34580ed4d8
> URL:http://dev.fedapps.toldark.com.au/solr/>,
> @options={:url=>"http://dev.fedapps.toldark.com.au:80/solr/"},
> @connection=#<RSolr::Connection:0x2b34580ed7a8>>
>>> rsolr.select :params => {:q => "*:*", :rows => 0}
> RSolr::Error::Http: RSolr::Error::Http - 400 Bad Request
> Error:
>
> Query: select?rows=0&q=%2A%3A%2A&wt=ruby
>
> Backtrace:
> /opt/ruby/1.8.7/lib/ruby/gems/1.8/gems/rsolr-1.0.0/lib/rsolr/client.rb:209:in
> `adapt_response'
> /opt/ruby/1.8.7/lib/ruby/gems/1.8/gems/rsolr-1.0.0/lib/rsolr/client.rb:152:in
> `execute'
> /opt/ruby/1.8.7/lib/ruby/gems/1.8/gems/rsolr-1.0.0/lib/rsolr/client.rb:146:in
> `send_and_receive'
> /opt/ruby/1.8.7/lib/ruby/gems/1.8/gems/rsolr-1.0.0/lib/rsolr/client.rb:222:in
> `method_missing'
> /opt/ruby/1.8.7/lib/ruby/gems/1.8/gems/rsolr-1.0.0/lib/rsolr/pagination.rb:54:in
> `method_missing'
> (irb):2:in `irb_binding'
> /opt/ruby/1.8.7/lib/ruby/1.8/irb/workspace.rb:52:in `irb_binding'
> /opt/ruby/1.8.7/lib/ruby/1.8/irb/workspace.rb:52
> from
> /opt/ruby/1.8.7/lib/ruby/gems/1.8/gems/rsolr-1.0.0/lib/rsolr/client.rb:209:in
> `adapt_response'
> from
> /opt/ruby/1.8.7/lib/ruby/gems/1.8/gems/rsolr-1.0.0/lib/rsolr/client.rb:152:in
> `execute'
> from
> /opt/ruby/1.8.7/lib/ruby/gems/1.8/gems/rsolr-1.0.0/lib/rsolr/client.rb:146:in
> `send_and_receive'
> from
> /opt/ruby/1.8.7/lib/ruby/gems/1.8/gems/rsolr-1.0.0/lib/rsolr/client.rb:222:in
> `method_missing'
> from
> /opt/ruby/1.8.7/lib/ruby/gems/1.8/gems/rsolr-1.0.0/lib/rsolr/pagination.rb:54:in
> `method_missing'
> from (irb):2
>>>
>
> On 20/05/2011 12:12, Matt Mitchell wrote:
>
> rsolr.select :params => {:q => "*:*", :rows => 0}
echo | ruby -pe 'require "open-uri"; puts
open("http://dev.fedapps.toldark.com.au/solr/select?rows=0&q=%2A%3A%2A&wt=ruby").read'
Also, can you show me the Apache log when curl/firefox hits solr?
Matt
On Thu, May 19, 2011 at 10:54 PM, Janna Wemekamp
Interesting. So it doesn't seem to work w/rsolr, but does work with curl/firefox. How about straight up Ruby? Can you try this in your shell? echo | ruby -pe 'require "open-uri"; puts open("http://dev.fedapps.toldark.com.au/solr/select?rows=0&q=%2A%3A%2A&wt=ruby").read'
Also, can you show me the Apache log when curl/firefox hits solr?
require "net/http"
require "uri"
url = "http://dev.fedapps.toldark.com.au/solr/select?rows=0&q=*:*&wt=ruby"
uri = URI.parse(url)
http = Net::HTTP.new uri.host, uri.port
get = Net::HTTP::Get.new(uri.to_s)
res = http.request get
puts "res.code => #{res.code}"
puts "res.body => #{res.body}"
Matt
On Thu, May 19, 2011 at 11:27 PM, Janna Wemekamp
Funky! Here's something else to try. Throw this into a solr-test.rb file and run it using "ruby solr-test.rb" require "net/http" require "uri" url = "http://dev.fedapps.toldark.com.au/solr/select?rows=0&q=*:*&wt=ruby" uri = URI.parse(url) http = Net::HTTP.new uri.host, uri.port get = Net::HTTP::Get.new(uri.to_s) res = http.request get puts "res.code => #{res.code}" puts "res.body => #{res.body}"
I think we may be on to something here. Can you tell me what version
of ruby you're using?
Matt
On Sun, May 22, 2011 at 9:50 PM, Janna Wemekamp
Matt
On Mon, May 23, 2011 at 9:37 PM, Janna Wemekamp
Matt
On Mon, May 23, 2011 at 11:11 PM, Janna Wemekamp