es-elasticity 0.3.2 → 0.3.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3b76200d65a0e6774e76eef4ea2251d9cc509173
4
- data.tar.gz: 1da42184260cbe560b050fd0177f01d7245ed524
3
+ metadata.gz: 0cbb10857bb7748235352492ba5b84030d7f4981
4
+ data.tar.gz: 24aa56bb7729c5308402a51fd01a5980b18ffd6b
5
5
  SHA512:
6
- metadata.gz: 3a649dc7bb0631b411f24eb9000ba477c224deb9d2e8876d8391e2176d95cb2e88aaa15820c80d8eb5f92f0118682f96840b0bac71924c5af629613b8ce9cbf5
7
- data.tar.gz: 67f7d70d8559fcd8167de2c9c32412a3eb5e43b588fdfe87ba01d98ff10eb01a76af57fcfd387b524892c128bec86f50f0d1246471d12138fcbc037ae0561cc7
6
+ metadata.gz: d50c3d3613c2ea9f42232f68ac8f98d247c0c421f05f9b3e5a7b379fa167c9da70d0dd2529b1a052a3aeb69b03a06ba028b48c840373a44cb4e4291b3f67f6e3
7
+ data.tar.gz: adcbb1bc6aceb1a8ba844bb8ac87f6a62c97822782ba49ffffe231391f940c05d5e269d6f815722d820c41cde284e10de7696324d229a75e71a203c336e1650f
data/README.md CHANGED
@@ -107,8 +107,8 @@ adults.active_recors(Database::User) # => Array of Database::User instances
107
107
 
108
108
  ## Roadmap
109
109
 
110
- - [ ] Index aliasing support
111
- - [ ] Index hot swapping support
110
+ - [x] Index aliasing support
111
+ - [x] Index hot swapping support
112
112
  - [ ] Use mapping instead of mappings, we wanna be consistent to ES not to elasticsearch-ruby
113
113
  - [ ] Define from_active_record interface
114
114
  - [ ] Write more detailed documentation section for:
@@ -51,7 +51,7 @@ module Elasticity
51
51
  })
52
52
 
53
53
  @client.index_flush(index: original_index)
54
- cursor = @client.search index: original_index, search_type: 'scan', scroll: '1m', _source: false, size: 100
54
+ cursor = @client.search index: original_index, search_type: 'scan', scroll: '10m', _source: false, size: 100
55
55
  loop do
56
56
  cursor = @client.scroll(scroll_id: cursor['_scroll_id'], scroll: '1m')
57
57
  hits = cursor['hits']['hits']
@@ -1,3 +1,3 @@
1
1
  module Elasticity
2
- VERSION = "0.3.2"
2
+ VERSION = "0.3.3"
3
3
  end
@@ -100,9 +100,10 @@ RSpec.describe "Search" do
100
100
  to_sql: "SELECT * FROM table_name WHERE id IN (1)"
101
101
  )
102
102
  allow(relation.connection).to receive(:quote_column_name) { |name| name }
103
+ allow(relation.connection).to receive(:quote) { |name| name }
103
104
 
104
105
  expect(relation).to receive(:where).with("table_name.id IN (?)", [1, 2]).and_return(relation)
105
- expect(relation).to receive(:order).with("FIELD(table_name.id,1,2)").and_return(relation)
106
+ expect(relation).to receive(:order).with("FIELD(table_name.id, 1,2)").and_return(relation)
106
107
 
107
108
  expect(subject.active_records(relation).to_sql).to eq "SELECT * FROM table_name WHERE id IN (1)"
108
109
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: es-elasticity
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rodrigo Kochenburger
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-25 00:00:00.000000000 Z
11
+ date: 2015-02-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler