es-elasticity 0.3.2 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/elasticity/strategies/alias_index.rb +1 -1
- data/lib/elasticity/version.rb +1 -1
- data/spec/units/search_spec.rb +2 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0cbb10857bb7748235352492ba5b84030d7f4981
|
4
|
+
data.tar.gz: 24aa56bb7729c5308402a51fd01a5980b18ffd6b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
- [
|
111
|
-
- [
|
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: '
|
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']
|
data/lib/elasticity/version.rb
CHANGED
data/spec/units/search_spec.rb
CHANGED
@@ -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.
|
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:
|
11
|
+
date: 2015-02-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|