Created
May 12, 2011 01:55
-
-
Save mwmitchell/967793 to your computer and use it in GitHub Desktop.
force POST for all requests, and silence all errors
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| solr = RSolr.connect(:timeout => 60, :url => "http://localhost:8983/solr") | |
| module RSolr4Duncan | |
| def build_request path, opts | |
| super path, opts.merge(:method => :post) | |
| end | |
| def send_and_receive path, opts | |
| super rescue {} | |
| end | |
| end | |
| solr.extend RSolr4Duncan | |
| r = solr.get "select", :params => {:q => "AND OR"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment