elasticsearch_record 1.5.1 → 1.5.2

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
  SHA256:
3
- metadata.gz: b6e4ca9acc6ee9abda4a3dacec4a75f9f1af77c361dbff3b53aa30648dfa5a5f
4
- data.tar.gz: f6cf2edda611efb7daa6585764c09c2320040c8970555d64dab96ced763d2f19
3
+ metadata.gz: 9a53ead4edbffa7bb74c8021008343f80813512f89b6580717d7d4335ce238ba
4
+ data.tar.gz: 26603c0b2de3b938c4239401652d4986088be1d29b1c039c2feb0c48b83a5207
5
5
  SHA512:
6
- metadata.gz: 1d9327c0b6500d47ec5459ebd5e6053d8178d59b33cd690d5f9a2752ec22cc52d2728b295dd4644c5f7fa6b794c6a8d69305b372c6c138e2ae8c717500669453
7
- data.tar.gz: 050e345874250113d23c69d4de6d3c8f35c7c6b4538fe8d1ee3dbeaf86a64dc7c745175a8301c5d78121481927bff34033a321e390fbaddf3356110951afb3c4
6
+ metadata.gz: 8d60b93db8b944ac6b0b42c91e411d6ae9673f773feeab7fbc9097e519663401a349936a271f6949d65f46485198cce44c349c38d3d2f668e2f3ee6148417264
7
+ data.tar.gz: 9e3a2700baa40c8bc4b6a72c6a94895f3beb030294955ca6d1a168349c81b289d80bf2d93cfa5411f0a8c2a74dd3b183ece5ee64ef3deef7ff2f0f440aef32dc
data/README.md CHANGED
@@ -337,6 +337,8 @@ SearchUser.where(name: 'Peter').limit(nil)
337
337
  # returns up to 10_000 items ...
338
338
  # => [...]
339
339
 
340
+ # hint: setting the 'max_result_window' can also be done by providing '__max__' wto the limit method: SearchUser.limit('__max__')
341
+
340
342
  # hint: if you want more than 10_000 use the +#pit_results+ method!
341
343
  ```
342
344
 
data/docs/CHANGELOG.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # ElasticsearchRecord - CHANGELOG
2
2
 
3
+ ## [1.5.2] - 2023-07-12
4
+ * [fix] `ElasticsearchRecord::Relation#limit` setter method `limit_value=` to work with **delegate_query_nil_limit?**
5
+
3
6
  ## [1.5.1] - 2023-07-11
4
7
  * [fix] `ElasticsearchRecord::ModelApi` 'drop!' & 'truncate!' methods to support correct parameter 'confirm'
5
8
  * [ref] improved yard documentation
@@ -9,7 +9,7 @@ module ElasticsearchRecord
9
9
  module VERSION
10
10
  MAJOR = 1
11
11
  MINOR = 5
12
- TINY = 1
12
+ TINY = 2
13
13
  PRE = nil
14
14
 
15
15
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
@@ -44,11 +44,11 @@ module ElasticsearchRecord
44
44
  end
45
45
 
46
46
  # overwrite the limit_value setter, to provide a special behaviour of auto-setting the +max_result_window+.
47
- def limit=(limit)
47
+ def limit_value=(limit)
48
48
  if limit == '__max__' || (limit.nil? && delegate_query_nil_limit?)
49
49
  super(max_result_window)
50
50
  else
51
- super
51
+ super(limit)
52
52
  end
53
53
  end
54
54
 
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.5.1
4
+ version: 1.5.2
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-07-11 00:00:00.000000000 Z
11
+ date: 2023-07-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord