zinx 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/zinx.rb +7 -6
- data/test/test.rb +2 -0
- metadata +2 -2
data/lib/zinx.rb
CHANGED
@@ -173,7 +173,6 @@ module Zinx
|
|
173
173
|
def add_query
|
174
174
|
@multiple_queries = true
|
175
175
|
@client.AddQuery(@query, @index_name)
|
176
|
-
reset
|
177
176
|
end
|
178
177
|
|
179
178
|
# Entry point for searches
|
@@ -189,7 +188,7 @@ module Zinx
|
|
189
188
|
run
|
190
189
|
return @results
|
191
190
|
else
|
192
|
-
yield
|
191
|
+
yield self
|
193
192
|
end
|
194
193
|
end
|
195
194
|
|
@@ -212,9 +211,9 @@ module Zinx
|
|
212
211
|
@match = hash
|
213
212
|
end
|
214
213
|
|
215
|
-
def each
|
214
|
+
def each
|
216
215
|
@match.each do |m|
|
217
|
-
|
216
|
+
yield m
|
218
217
|
end
|
219
218
|
end
|
220
219
|
|
@@ -235,8 +234,10 @@ module Zinx
|
|
235
234
|
def initialize(sphinx_hash)
|
236
235
|
@matches = []
|
237
236
|
@sphinx_hash = sphinx_hash
|
238
|
-
@sphinx_hash
|
239
|
-
@matches
|
237
|
+
if @sphinx_hash.has_key?("matches")
|
238
|
+
@sphinx_hash["matches"].each do |match|
|
239
|
+
@matches << Match.new(match)
|
240
|
+
end
|
240
241
|
end
|
241
242
|
end
|
242
243
|
|
data/test/test.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zinx
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -23,7 +23,7 @@ files:
|
|
23
23
|
- lib/sphinx/sphinx.rb
|
24
24
|
- lib/zinx.rb
|
25
25
|
- test/test.rb
|
26
|
-
homepage: https://github.com/gabrielhora/
|
26
|
+
homepage: https://github.com/gabrielhora/zinx
|
27
27
|
licenses: []
|
28
28
|
post_install_message:
|
29
29
|
rdoc_options: []
|