Skip to content

Commit 9db61d2

Browse files
authored
Merge pull request #3635 from projectblacklight/remove-legacy-request-handler
Remove legacy document_solr_request_handler
2 parents 79c62a3 + b6a5ad8 commit 9db61d2

File tree

3 files changed

+0
-24
lines changed

3 files changed

+0
-24
lines changed

lib/blacklight/configuration.rb

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,6 @@ def initialized_default_configuration?
6666

6767
# === Single document request configuration
6868

69-
# @!attribute document_solr_request_handler
70-
# @return [String] The solr request handler to use when requesting only a single document
71-
property :document_solr_request_handler, default: nil
7269
# @!attribute document_solr_path
7370
# @since v5.2.0
7471
# @return [String] The url path (relative to the solr base url) to use when requesting only a single document

lib/blacklight/solr/repository.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ class Repository < Blacklight::AbstractRepository
88
# @param [Hash] params additional solr query parameters
99
def find id, params = {}
1010
doc_params = params.reverse_merge(blacklight_config.default_document_solr_params)
11-
.reverse_merge(qt: blacklight_config.document_solr_request_handler)
1211
.merge(blacklight_config.document_unique_id_param => id)
1312

1413
solr_response = send_and_receive blacklight_config.document_solr_path || blacklight_config.solr_path, doc_params

spec/models/blacklight/solr/repository_spec.rb

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -44,26 +44,6 @@
4444
end
4545
end
4646

47-
context "with legacy request handler-based configuration" do
48-
before do
49-
blacklight_config.document_solr_path = 'select'
50-
blacklight_config.document_unique_id_param = :id
51-
end
52-
53-
it "uses the provided :qt param" do
54-
blacklight_config.document_solr_request_handler = 'xyz'
55-
allow(subject.connection).to receive(:send_and_receive).with('select', hash_including(params: { id: '123', qt: 'abc' })).and_return(mock_response)
56-
expect(subject.find("123", qt: 'abc')).to be_a Blacklight::Solr::Response
57-
end
58-
59-
it "uses the :qt parameter from the default_document_solr_params" do
60-
blacklight_config.default_document_solr_params[:qt] = 'abc'
61-
blacklight_config.document_solr_request_handler = 'xyz'
62-
allow(subject.connection).to receive(:send_and_receive).with('select', hash_including(params: { id: '123', qt: 'abc' })).and_return(mock_response)
63-
expect(subject.find("123")).to be_a Blacklight::Solr::Response
64-
end
65-
end
66-
6747
it "preserves the class of the incoming params" do
6848
doc_params = ActiveSupport::HashWithIndifferentAccess.new
6949
allow(subject.connection).to receive(:send_and_receive).with('get', anything).and_return(mock_response)

0 commit comments

Comments
 (0)