elasticsearch_record 1.3.0 → 1.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/docs/CHANGELOG.md +5 -0
- data/lib/active_record/connection_adapters/elasticsearch/schema_definitions/update_table_definition.rb +2 -0
- data/lib/active_record/connection_adapters/elasticsearch/table_statements.rb +6 -6
- data/lib/elasticsearch_record/gem_version.rb +1 -1
- data/lib/elasticsearch_record/relation/query_methods.rb +5 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e8e00649a9c1e9451d8ea006078889081a70cb178a3d0f23336d157929eefafc
|
4
|
+
data.tar.gz: '0596785a16b974b95a48ccb2bb3cb6a334ce553e8d80b1b82691ee98df18fe3b'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 61301e89b67d34fd4ed604a782c85b84bd2316f98c7b67ddf293ad2a27e17e30531b905e7ecdc5a4d9dad34099d9feab8603269b2ee0e680b2a0cd2ff39835d3
|
7
|
+
data.tar.gz: d7d208605dbbe0c09acccacda2ac6deba8a69f85540046ac098b555b9bc5212e7c19c137df1957f0b692112dc694f2a3913538671183e18052061f417f1dbd4b
|
data/docs/CHANGELOG.md
CHANGED
@@ -1,5 +1,10 @@
|
|
1
1
|
# ElasticsearchRecord - CHANGELOG
|
2
2
|
|
3
|
+
## [1.3.1] - 2023-01-18
|
4
|
+
* [fix] `#none!` method to correctly invalidate the query (String(s) in where-queries like '1=0' will raise now)
|
5
|
+
* [fix] missing 'ChangeSettingDefinition' & 'RemoveSettingDefinition' @ `ActiveRecord::ConnectionAdapters::Elasticsearch::UpdateTableDefinition::COMPOSITE_DEFINITIONS` to composite in a single query
|
6
|
+
* [fix] `#unblock_table`-method in 'connection' to now remove blocks instead of setting to 'false'
|
7
|
+
|
3
8
|
## [1.3.0] - 2023-01-17
|
4
9
|
* [add] 'metas: {}' param for `CreateTableDefinition` to provide individual meta information without providing them through 'mappings'
|
5
10
|
* [add] 'change_'- & 'remove_'-methods for _mapping, setting & alias_ for `CreateTableDefinition`
|
@@ -73,7 +73,7 @@ module ActiveRecord
|
|
73
73
|
# @param [String] table_name
|
74
74
|
# @return [Boolean] result state (returns false if refreshing failed)
|
75
75
|
def refresh_table(table_name)
|
76
|
-
api(:indices, :refresh, { index: table_name }, 'REFRESH TABLE').dig('_shards','failed') == 0
|
76
|
+
api(:indices, :refresh, { index: table_name }, 'REFRESH TABLE').dig('_shards', 'failed') == 0
|
77
77
|
end
|
78
78
|
|
79
79
|
# refresh indices by provided names.
|
@@ -138,13 +138,13 @@ module ActiveRecord
|
|
138
138
|
def unblock_table(table_name, block_name = nil)
|
139
139
|
if block_name.nil?
|
140
140
|
change_table(table_name) do |t|
|
141
|
-
t.change_setting('index.blocks.read',
|
142
|
-
t.change_setting('index.blocks.write',
|
143
|
-
t.change_setting('index.blocks.read_only',
|
144
|
-
t.change_setting('index.blocks.metadata',
|
141
|
+
t.change_setting('index.blocks.read', nil)
|
142
|
+
t.change_setting('index.blocks.write', nil)
|
143
|
+
t.change_setting('index.blocks.read_only', nil)
|
144
|
+
t.change_setting('index.blocks.metadata', nil)
|
145
145
|
end
|
146
146
|
else
|
147
|
-
change_setting(table_name, "index.blocks.#{block_name}",
|
147
|
+
change_setting(table_name, "index.blocks.#{block_name}", nil)
|
148
148
|
end
|
149
149
|
end
|
150
150
|
|
@@ -177,6 +177,11 @@ module ElasticsearchRecord
|
|
177
177
|
self
|
178
178
|
end
|
179
179
|
|
180
|
+
def none! # :nodoc:
|
181
|
+
# tell the query it 'failed'
|
182
|
+
configure!(:__query__, status: :failed).extending!(ActiveRecord::NullRelation)
|
183
|
+
end
|
184
|
+
|
180
185
|
# creates a condition on the relation.
|
181
186
|
# There are several possibilities to call this method.
|
182
187
|
# @example
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: elasticsearch_record
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tobias Gonsior
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-01-
|
11
|
+
date: 2023-01-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|