solr4r 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ChangeLog +6 -0
- data/README +1 -1
- data/Rakefile +2 -2
- data/lib/solr4r/client/query.rb +1 -5
- data/lib/solr4r/version.rb +1 -1
- data/spec/solr4r/builder_spec.rb +7 -3
- metadata +12 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9ced727a63a4c77e523f0ba3e3ba2f963969af13
|
4
|
+
data.tar.gz: 652f439816c4998089d16f715ad9cf5838d564a2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 52668f7763f45cb4d3ff9f1fb6369e17877109bfc3d5b5a59c786d05299441b39d21960b8b6d4c5f68c4c29b8d641d5cd790b0118e83de952583862d6737f9a7
|
7
|
+
data.tar.gz: 6a034823bc56d31121bdf52b96564f8fb65dee4a9e7d9ad458093247788315924c3b07f73d21371e414f84840a46edd6a23304d4bdfe62595e9fd8c71a41fa0f
|
data/ChangeLog
CHANGED
@@ -2,6 +2,12 @@
|
|
2
2
|
|
3
3
|
= Revision history for solr4r
|
4
4
|
|
5
|
+
== 0.2.0 [2015-12-14]
|
6
|
+
|
7
|
+
* Updated Solr4R::Client::Query#more_like_this_q for Solr 5.4.0.
|
8
|
+
* Adds support for boost option and excludes current document from results
|
9
|
+
(SOLR-7912[https://issues.apache.org/jira/browse/SOLR-7912]).
|
10
|
+
|
5
11
|
== 0.1.0 [2015-08-14]
|
6
12
|
|
7
13
|
* Require at least Ruby 2.0.
|
data/README
CHANGED
data/Rakefile
CHANGED
@@ -14,9 +14,9 @@ begin
|
|
14
14
|
license: %q{AGPL-3.0},
|
15
15
|
homepage: :blackwinter,
|
16
16
|
|
17
|
-
dependencies: { nokogiri: '~> 1.6', 'nuggets' => '~> 1.
|
17
|
+
dependencies: { nokogiri: '~> 1.6', 'nuggets' => '~> 1.4' },
|
18
18
|
|
19
|
-
development_dependencies: { vcr: '~> 2.9', webmock: '~> 1.
|
19
|
+
development_dependencies: { vcr: '~> 2.9', webmock: '~> 1.22' },
|
20
20
|
|
21
21
|
required_ruby_version: '>= 2.0'
|
22
22
|
}
|
data/lib/solr4r/client/query.rb
CHANGED
@@ -35,6 +35,7 @@ module Solr4R
|
|
35
35
|
MLT_DEFAULT_FL = '*,score'
|
36
36
|
MLT_DEFAULT_ROWS = 5
|
37
37
|
MLT_LOCAL_PARAMS = local_params_string(%w[
|
38
|
+
boost
|
38
39
|
maxdf
|
39
40
|
maxntp
|
40
41
|
maxqt
|
@@ -78,11 +79,6 @@ module Solr4R
|
|
78
79
|
def more_like_this_q(id, fields,
|
79
80
|
params = {}, options = {}, path = DEFAULT_SELECT_PATH, &block)
|
80
81
|
|
81
|
-
# Drop after Solr 5.4.0 has been released?
|
82
|
-
# https://issues.apache.org/jira/browse/SOLR-7912
|
83
|
-
params = amend_options_array(
|
84
|
-
params, :fq, '-id' => id, _: { cache: false })
|
85
|
-
|
86
82
|
_more_like_this_query(MLT_LOCAL_PARAMS + id,
|
87
83
|
fields, params, options, path, &block)
|
88
84
|
end
|
data/lib/solr4r/version.rb
CHANGED
data/spec/solr4r/builder_spec.rb
CHANGED
@@ -64,7 +64,9 @@ describe Solr4R::Builder do
|
|
64
64
|
<add>
|
65
65
|
<doc>
|
66
66
|
<field name="id">42</field>
|
67
|
-
|
67
|
+
#{Nokogiri.jruby? ?
|
68
|
+
'<field boost="2.0" name="text">blah</field>' :
|
69
|
+
'<field name="text" boost="2.0">blah</field>' }
|
68
70
|
</doc>
|
69
71
|
</add>
|
70
72
|
EOT
|
@@ -76,7 +78,9 @@ describe Solr4R::Builder do
|
|
76
78
|
<add commitWithin="23">
|
77
79
|
<doc boost="10.0">
|
78
80
|
<field name="id">42</field>
|
79
|
-
|
81
|
+
#{Nokogiri.jruby? ?
|
82
|
+
'<field boost="2.0" name="text">blah</field>' :
|
83
|
+
'<field name="text" boost="2.0">blah</field>' }
|
80
84
|
</doc>
|
81
85
|
</add>
|
82
86
|
EOT
|
@@ -253,7 +257,7 @@ describe Solr4R::Builder do
|
|
253
257
|
end
|
254
258
|
|
255
259
|
example do
|
256
|
-
expect{described_class.new(Solr4R::Client.new(core: 'foo'))}.not_to raise_error(NoMethodError, /core=/)
|
260
|
+
expect{described_class.new(Solr4R::Client.new(core: 'foo'))}.not_to raise_error#(NoMethodError, /core=/)
|
257
261
|
end
|
258
262
|
|
259
263
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: solr4r
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jens Wille
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-12-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '1.
|
33
|
+
version: '1.4'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '1.
|
40
|
+
version: '1.4'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: vcr
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -58,14 +58,14 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '1.
|
61
|
+
version: '1.22'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '1.
|
68
|
+
version: '1.22'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: hen
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -161,15 +161,15 @@ licenses:
|
|
161
161
|
metadata: {}
|
162
162
|
post_install_message: |2+
|
163
163
|
|
164
|
-
solr4r-0.
|
164
|
+
solr4r-0.2.0 [2015-12-14]:
|
165
165
|
|
166
|
-
*
|
167
|
-
|
168
|
-
|
166
|
+
* Updated Solr4R::Client::Query#more_like_this_q for Solr 5.4.0.
|
167
|
+
* Adds support for boost option and excludes current document from results
|
168
|
+
(SOLR-7912[https://issues.apache.org/jira/browse/SOLR-7912]).
|
169
169
|
|
170
170
|
rdoc_options:
|
171
171
|
- "--title"
|
172
|
-
- solr4r Application documentation (v0.
|
172
|
+
- solr4r Application documentation (v0.2.0)
|
173
173
|
- "--charset"
|
174
174
|
- UTF-8
|
175
175
|
- "--line-numbers"
|
@@ -190,7 +190,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
190
190
|
version: '0'
|
191
191
|
requirements: []
|
192
192
|
rubyforge_project:
|
193
|
-
rubygems_version: 2.
|
193
|
+
rubygems_version: 2.5.1
|
194
194
|
signing_key:
|
195
195
|
specification_version: 4
|
196
196
|
summary: A Ruby client for Apache Solr.
|