mwmitchell-rsolr-ext 0.6.0 → 0.6.1
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.
- data/lib/rsolr-ext/response/docs.rb +5 -5
- data/lib/rsolr-ext/response/facets.rb +3 -3
- data/lib/rsolr-ext/response.rb +5 -5
- data/lib/rsolr-ext.rb +1 -1
- data/rsolr-ext.gemspec +2 -2
- metadata +2 -2
@@ -81,16 +81,16 @@ module RSolr::Ext::Response::Docs
|
|
81
81
|
end
|
82
82
|
|
83
83
|
def self.extended(base)
|
84
|
-
d = base
|
84
|
+
d = base['response']['docs']
|
85
85
|
d.extend Pageable
|
86
86
|
d.each{|item|item.extend Accessable}
|
87
|
-
d.start = base
|
88
|
-
d.per_page = base
|
89
|
-
d.total = base
|
87
|
+
d.start = base['responseHeader']['params']['start'].to_s.to_i
|
88
|
+
d.per_page = base['responseHeader']['params']['rows'].to_s.to_i
|
89
|
+
d.total = base['responseHeader']['numFound'].to_s.to_i
|
90
90
|
end
|
91
91
|
|
92
92
|
def docs
|
93
|
-
response[
|
93
|
+
response['docs']
|
94
94
|
end
|
95
95
|
|
96
96
|
end
|
@@ -56,17 +56,17 @@ module RSolr::Ext::Response::Facets
|
|
56
56
|
end
|
57
57
|
|
58
58
|
def facet_counts
|
59
|
-
@facet_counts ||= self[
|
59
|
+
@facet_counts ||= self['facet_counts'] || {}
|
60
60
|
end
|
61
61
|
|
62
62
|
# Returns the hash of all the facet_fields (ie: {'instock_b' => ['true', 123, 'false', 20]}
|
63
63
|
def facet_fields
|
64
|
-
@facet_fields ||= facet_counts[
|
64
|
+
@facet_fields ||= facet_counts['facet_fields'] || {}
|
65
65
|
end
|
66
66
|
|
67
67
|
# Returns all of the facet queries
|
68
68
|
def facet_queries
|
69
|
-
@facet_queries ||= facet_counts[
|
69
|
+
@facet_queries ||= facet_counts['facet_queries'] || {}
|
70
70
|
end
|
71
71
|
|
72
72
|
end # end Facets
|
data/lib/rsolr-ext/response.rb
CHANGED
@@ -6,15 +6,15 @@ module RSolr::Ext::Response
|
|
6
6
|
class Base < Mash
|
7
7
|
|
8
8
|
def header
|
9
|
-
self[
|
9
|
+
self['responseHeader']
|
10
10
|
end
|
11
11
|
|
12
12
|
def params
|
13
|
-
header[
|
13
|
+
header['params']
|
14
14
|
end
|
15
15
|
|
16
16
|
def ok?
|
17
|
-
header[
|
17
|
+
header['status'] == 0
|
18
18
|
end
|
19
19
|
|
20
20
|
end
|
@@ -29,7 +29,7 @@ module RSolr::Ext::Response
|
|
29
29
|
end
|
30
30
|
|
31
31
|
def response
|
32
|
-
self[
|
32
|
+
self['response']
|
33
33
|
end
|
34
34
|
|
35
35
|
end
|
@@ -51,7 +51,7 @@ module RSolr::Ext::Response
|
|
51
51
|
end
|
52
52
|
|
53
53
|
def fields
|
54
|
-
self[
|
54
|
+
self['fields']
|
55
55
|
end
|
56
56
|
|
57
57
|
end# end Luke
|
data/lib/rsolr-ext.rb
CHANGED
data/rsolr-ext.gemspec
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = "rsolr-ext"
|
3
|
-
s.version = "0.6.
|
4
|
-
s.date = "2009-04
|
3
|
+
s.version = "0.6.1"
|
4
|
+
s.date = "2009-05-04"
|
5
5
|
s.summary = "An extension lib for RSolr"
|
6
6
|
s.email = "goodieboy@gmail.com"
|
7
7
|
s.homepage = "http://github.com/mwmitchell/rsolr_ext"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mwmitchell-rsolr-ext
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Mitchell
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-04
|
12
|
+
date: 2009-05-04 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|