elastic_record 4.1.7 → 4.1.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0e036810657fdeaccd451312d65f96ca86ab6af4
4
- data.tar.gz: 4e809510fb34195484f3e3a71489a0ff6bb63958
3
+ metadata.gz: def9a67ba563b5ae2dfc9928f1bf6f9167763c7d
4
+ data.tar.gz: 345857b95dea56d079fd7e431d07659af21cda94
5
5
  SHA512:
6
- metadata.gz: bf05c32ef8fa7d71721f61eb73c96704593705d8ca6a76349d597e3f5ac06706ea430858ca6b44c5e0f3c5e7f3765b810ac46e1c5e8150b7b3e81c36f9dde1f4
7
- data.tar.gz: fe9620482b1dd96335dfe925be63d4590cb05a47a5652d336cf3b56658a166859a7eb13633bfcd6ab70abef5f98ea80a6a4972a1d1fd265496da45d611e4621e
6
+ metadata.gz: 40c79f1e780cc01977532cec6c5feb3950f464b9afa38615661f6aa978f8ffb1d5e4763cdf4ca9028b0433048820b2acee24f9ed0eb6cb472e35c018b2d843bf
7
+ data.tar.gz: 634ce4d865cef8c57fa3ce1b9556cba7d4a0b53618eb96f3d3489389387b5d9b0d48a8250a499d21e772520b7055e88330244d321e06cc7efb1b85e60342e5ff
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = 'elastic_record'
5
- s.version = '4.1.7'
5
+ s.version = '4.1.8'
6
6
  s.summary = 'An Elasticsearch querying ORM'
7
7
  s.description = 'Find your records with Elasticsearch'
8
8
 
@@ -44,7 +44,7 @@ module ElasticRecord
44
44
  def initial_search_response
45
45
  @initial_search_response ||= begin
46
46
  search_options = {size: batch_size, scroll: keep_alive}
47
- elastic_query = @search.merge('sort' => '_doc')
47
+ elastic_query = @search.reverse_merge('sort' => '_doc')
48
48
  @elastic_index.search(elastic_query, search_options)
49
49
  end
50
50
  end
@@ -22,6 +22,15 @@ class ElasticRecord::Relation::BatchesTest < MiniTest::Test
22
22
  assert_equal [['5', '10', '15'].to_set], results.map(&:to_set)
23
23
  end
24
24
 
25
+ def test_find_ids_in_batches_with_order
26
+ results = []
27
+ Widget.elastic_relation.order(color: :asc).find_ids_in_batches do |ids|
28
+ results << ids
29
+ end
30
+
31
+ assert_equal [['10', '15', '5']], results
32
+ end
33
+
25
34
  def test_find_ids_in_batches_with_size
26
35
  results = []
27
36
  Widget.elastic_relation.find_ids_in_batches(batch_size: 2) do |ids|
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: elastic_record
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.1.7
4
+ version: 4.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Infogroup
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-09-28 00:00:00.000000000 Z
12
+ date: 2017-10-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: arelastic
@@ -185,7 +185,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
185
185
  version: 1.8.11
186
186
  requirements: []
187
187
  rubyforge_project:
188
- rubygems_version: 2.6.11
188
+ rubygems_version: 2.6.13
189
189
  signing_key:
190
190
  specification_version: 4
191
191
  summary: An Elasticsearch querying ORM