rubberband 0.9.2 → 0.9.3
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/elasticsearch/client/index.rb +1 -1
- data/lib/elasticsearch/version.rb +1 -1
- data/spec/index_spec.rb +2 -0
- metadata +2 -2
@@ -72,7 +72,7 @@ module ElasticSearch
|
|
72
72
|
def search(query, options={})
|
73
73
|
index, type, options = extract_scope(options)
|
74
74
|
|
75
|
-
options[:size] ||= (options[:per_page] || options[:limit] ||
|
75
|
+
options[:size] ||= (options[:per_page] || options[:limit]) if options[:per_page] || options[:limit]
|
76
76
|
options[:from] ||= options[:size] * (options[:page].to_i-1) if options[:page] && options[:page].to_i > 1
|
77
77
|
options[:from] ||= options[:offset] if options[:offset]
|
78
78
|
|
data/spec/index_spec.rb
CHANGED
@@ -30,6 +30,8 @@ describe "index ops" do
|
|
30
30
|
|
31
31
|
@client.search(:query => { :term => { :foo => 'baz' }}).should have(2).items
|
32
32
|
@client.count(:term => { :foo => 'baz' }).should == 2
|
33
|
+
|
34
|
+
@client.search(:size => 1, :query => { :term => { :foo => 'baz' }}).should have(1).items
|
33
35
|
end
|
34
36
|
|
35
37
|
it 'should return ids when given :ids_only' do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rubberband
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-08-
|
12
|
+
date: 2012-08-03 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: faraday
|