multi-solr 01.03.00 → 01.04.00
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -42,10 +42,14 @@ class MultiSolr::SingleCoreHandler
|
|
|
42
42
|
|
|
43
43
|
# Liefert RSolr-Connection (RSolr.connect) zum konfigurierten SOLR-Server(see solr_url)
|
|
44
44
|
# und konfiguriertem Core (see core_name)
|
|
45
|
-
|
|
45
|
+
# Params:
|
|
46
|
+
# options: optionale Connect-Parameters, see Rsolr.connect
|
|
47
|
+
def solr_connection options=nil
|
|
46
48
|
url = "#{@solr_url}/#{@core_name}"
|
|
47
49
|
MultiSolr.logger.debug("solr_connection: url==#{url}") if MultiSolr.logger.debug?
|
|
48
|
-
|
|
50
|
+
connect_params = {:url => url}
|
|
51
|
+
connect_params.merge!(options) if options
|
|
52
|
+
RSolr.connect connect_params
|
|
49
53
|
end
|
|
50
54
|
|
|
51
55
|
|
data/lib/multi_solr/version.rb
CHANGED
|
@@ -52,6 +52,14 @@ describe MultiSolr::SingleCoreHandler do
|
|
|
52
52
|
subject.solr_connection[:url].should == "#{SolrTestdataProvider::SOLR_TEST_INSTANCE_URL}/core-01"
|
|
53
53
|
end
|
|
54
54
|
|
|
55
|
+
|
|
56
|
+
it "should connect with addional params" do
|
|
57
|
+
RSolr.should_receive(:connect) do |options|
|
|
58
|
+
options # zum Test die options selbst wieder zurück liefern
|
|
59
|
+
end
|
|
60
|
+
connection = subject.solr_connection(:read_timeout => 300)
|
|
61
|
+
connection[:read_timeout].should == 300
|
|
62
|
+
end
|
|
55
63
|
end
|
|
56
64
|
|
|
57
65
|
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: multi-solr
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
hash:
|
|
4
|
+
hash: 7
|
|
5
5
|
prerelease:
|
|
6
6
|
segments:
|
|
7
7
|
- 1
|
|
8
|
-
-
|
|
8
|
+
- 4
|
|
9
9
|
- 0
|
|
10
|
-
version: 01.
|
|
10
|
+
version: 01.04.00
|
|
11
11
|
platform: ruby
|
|
12
12
|
authors:
|
|
13
13
|
- Bernd Ledig
|
|
@@ -15,7 +15,7 @@ autorequire:
|
|
|
15
15
|
bindir: bin
|
|
16
16
|
cert_chain: []
|
|
17
17
|
|
|
18
|
-
date: 2012-
|
|
18
|
+
date: 2012-07-31 00:00:00 +02:00
|
|
19
19
|
default_executable:
|
|
20
20
|
dependencies:
|
|
21
21
|
- !ruby/object:Gem::Dependency
|