solr4r 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7622780508966d197a2ea3101266d7aa886102c1
4
- data.tar.gz: 6082b84092d225e23467b28b90a780c5c8d00b01
3
+ metadata.gz: e63d9ce33df2e160348f1ab43007971fcf8974dc
4
+ data.tar.gz: 1f3ceb990e484c7740c285a4d57a1dc6bfa0e1be
5
5
  SHA512:
6
- metadata.gz: 27012fe1c76d4dd9d52599c41375ae71bde7929548a84dc781a48d8dd27f508709c0a1a5c55007cd11da7a2fb1ce2a79d2e5223d9d74024444cd37277becf399
7
- data.tar.gz: 004c2706c97fd115fe2300ea265c353ac2aca0b878eea57af8ea14a6aae23523bb744bdb8e97d6416fe21568ab7d1238532bc8e50ff7ef509a7f72e7fe7a4045
6
+ metadata.gz: bed28de001919b965778e97b1e6aea1724144520d131ce9975be3aeb6b66e5658816cac382477d06915e5260b6895d425d87b6c9f57a392c7ba5dee1e1dc3096
7
+ data.tar.gz: 20aa0f8c1542b43bc9f0967a85c79bbaab909ac91517105baab3f4a6b298cee18639add5f36dc76a30f564380587398bc6d4bf53a2a6fbed5f7a7d58f9975edb
data/ChangeLog CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  = Revision history for solr4r
4
4
 
5
+ == 0.3.1 [2016-06-06]
6
+
7
+ * Added +limit+ parameter to Solr4R::Result#spellcheck_collations.
8
+
5
9
  == 0.3.0 [2016-03-23]
6
10
 
7
11
  * Extended Solr4R::Result for
data/README CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  == VERSION
4
4
 
5
- This documentation refers to solr4r version 0.3.0
5
+ This documentation refers to solr4r version 0.3.1
6
6
 
7
7
 
8
8
  == DESCRIPTION
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.4' },
17
+ dependencies: { nokogiri: '~> 1.6', 'nuggets' => '~> 1.5' },
18
18
 
19
- development_dependencies: { vcr: '~> 3.0', webmock: '~> 1.24' },
19
+ development_dependencies: { vcr: '~> 3.0', webmock: '~> 2.1' },
20
20
 
21
21
  required_ruby_version: '>= 2.0'
22
22
  }
@@ -168,11 +168,16 @@ module Solr4R
168
168
  fetch(__method__.to_s)
169
169
  end
170
170
 
171
- def spellcheck_collations
172
- return enum_for(__method__) unless block_given?
171
+ def spellcheck_collations(limit = 0)
172
+ return enum_for(__method__, limit) unless block_given?
173
+
174
+ keys, prev = %w[collationQuery hits], 0
173
175
 
174
176
  spellcheck.fetch('collations').each_slice(2) { |_, collation|
175
- yield collation.values_at('collationQuery', 'hits')
177
+ query, hits = collation.values_at(*keys)
178
+
179
+ limit ? hits >= limit ? yield(query, hits) : nil :
180
+ hits >= prev ? yield(query, prev = hits) : break
176
181
  }
177
182
  end
178
183
 
@@ -4,7 +4,7 @@ module Solr4R
4
4
 
5
5
  MAJOR = 0
6
6
  MINOR = 3
7
- TINY = 0
7
+ TINY = 1
8
8
 
9
9
  class << self
10
10
 
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.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jens Wille
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-03-23 00:00:00.000000000 Z
11
+ date: 2016-06-06 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.4'
33
+ version: '1.5'
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.4'
40
+ version: '1.5'
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.24'
61
+ version: '2.1'
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.24'
68
+ version: '2.1'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: hen
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -75,7 +75,7 @@ dependencies:
75
75
  version: '0.8'
76
76
  - - ">="
77
77
  - !ruby/object:Gem::Version
78
- version: 0.8.3
78
+ version: 0.8.5
79
79
  type: :development
80
80
  prerelease: false
81
81
  version_requirements: !ruby/object:Gem::Requirement
@@ -85,7 +85,7 @@ dependencies:
85
85
  version: '0.8'
86
86
  - - ">="
87
87
  - !ruby/object:Gem::Version
88
- version: 0.8.3
88
+ version: 0.8.5
89
89
  - !ruby/object:Gem::Dependency
90
90
  name: rake
91
91
  requirement: !ruby/object:Gem::Requirement
@@ -163,21 +163,13 @@ licenses:
163
163
  metadata: {}
164
164
  post_install_message: |2+
165
165
 
166
- solr4r-0.3.0 [2016-03-23]:
166
+ solr4r-0.3.1 [2016-06-06]:
167
167
 
168
- * Extended Solr4R::Result for
169
- debugging[https://wiki.apache.org/solr/CommonQueryParameters#Debugging].
170
- * Extended Solr4R::Result for
171
- highlighting[https://wiki.apache.org/solr/HighlightingParameters].
172
- * Extended Solr4R::Result for
173
- spellchecking[https://wiki.apache.org/solr/SpellCheckComponent].
174
- * Added support for date-/time objects and ranges.
175
- * Refactored Solr4R::Client, Solr4R::Builder, Solr4R::Document,
176
- Solr4R::Result.
168
+ * Added +limit+ parameter to Solr4R::Result#spellcheck_collations.
177
169
 
178
170
  rdoc_options:
179
171
  - "--title"
180
- - solr4r Application documentation (v0.3.0)
172
+ - solr4r Application documentation (v0.3.1)
181
173
  - "--charset"
182
174
  - UTF-8
183
175
  - "--line-numbers"
@@ -198,7 +190,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
198
190
  version: '0'
199
191
  requirements: []
200
192
  rubyforge_project:
201
- rubygems_version: 2.6.2
193
+ rubygems_version: 2.6.4
202
194
  signing_key:
203
195
  specification_version: 4
204
196
  summary: A Ruby client for Apache Solr.