rubberband 0.9.2 → 0.9.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -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] || 10)
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
 
@@ -1,3 +1,3 @@
1
1
  module ElasticSearch
2
- VERSION = "0.9.2"
2
+ VERSION = "0.9.3"
3
3
  end
@@ -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.2
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-02 00:00:00.000000000 Z
12
+ date: 2012-08-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: faraday