solrsan 0.0.21 → 0.0.22

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- solrsan (0.0.20)
4
+ solrsan (0.0.21)
5
5
  activemodel (~> 3.0.5)
6
6
  activesupport (~> 3.0.5)
7
7
  rsolr (~> 1.0.0)
@@ -135,6 +135,11 @@ module Solrsan
135
135
  def embed_highlighting(search_response)
136
136
  return search_response unless search_response[:highlighting]
137
137
 
138
+ #save original pagniate keys
139
+ per_page = search_response[:docs].per_page
140
+ start = search_response[:docs].start
141
+ total = search_response[:docs].total
142
+
138
143
  highlighted_docs = search_response[:docs].map do |doc|
139
144
  hl_metadata = search_response[:highlighting][doc['id']]
140
145
  hl_metadata.each{ |k,v| doc[k] = v } if hl_metadata
@@ -143,6 +148,12 @@ module Solrsan
143
148
  end
144
149
 
145
150
  search_response[:docs] = highlighted_docs
151
+
152
+ search_response[:docs].extend RSolr::Pagination::PaginatedDocSet
153
+ search_response[:docs].per_page = per_page
154
+ search_response[:docs].start = start
155
+ search_response[:docs].total = total
156
+
146
157
  search_response
147
158
  end
148
159
 
@@ -1,3 +1,3 @@
1
1
  module Solrsan
2
- VERSION = "0.0.21"
2
+ VERSION = "0.0.22"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: solrsan
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.21
4
+ version: 0.0.22
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -14,7 +14,7 @@ default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rsolr
17
- requirement: &2152897700 !ruby/object:Gem::Requirement
17
+ requirement: &2160385900 !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
20
  - - ~>
@@ -22,10 +22,10 @@ dependencies:
22
22
  version: 1.0.0
23
23
  type: :runtime
24
24
  prerelease: false
25
- version_requirements: *2152897700
25
+ version_requirements: *2160385900
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: activemodel
28
- requirement: &2152897120 !ruby/object:Gem::Requirement
28
+ requirement: &2160385400 !ruby/object:Gem::Requirement
29
29
  none: false
30
30
  requirements:
31
31
  - - ~>
@@ -33,10 +33,10 @@ dependencies:
33
33
  version: 3.0.5
34
34
  type: :runtime
35
35
  prerelease: false
36
- version_requirements: *2152897120
36
+ version_requirements: *2160385400
37
37
  - !ruby/object:Gem::Dependency
38
38
  name: activesupport
39
- requirement: &2152896640 !ruby/object:Gem::Requirement
39
+ requirement: &2160384940 !ruby/object:Gem::Requirement
40
40
  none: false
41
41
  requirements:
42
42
  - - ~>
@@ -44,7 +44,7 @@ dependencies:
44
44
  version: 3.0.5
45
45
  type: :runtime
46
46
  prerelease: false
47
- version_requirements: *2152896640
47
+ version_requirements: *2160384940
48
48
  description: solrsan is a lightweight wrapper for using Apache Solr within a Ruby
49
49
  application including Rails and Sinatra.
50
50
  email: