meilisearch 0.19.0 → 0.19.1

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
  SHA256:
3
- metadata.gz: c9f1a9263f33fa8d970a5e29e89ce13b213deaaa187c557e6122e2960973e22b
4
- data.tar.gz: 5aeed7da3ed485ee621db8ea182574e50681cd1efe8a5d58430cce271c17e304
3
+ metadata.gz: baef66d6ee72247efa51f7789857e45da0380221c2c8bca1def9faf7c94604dc
4
+ data.tar.gz: 671cc838677bf43b043cad0157ee9132a0485d4099076fde963a13a4a27f5e54
5
5
  SHA512:
6
- metadata.gz: 976733a7fa10473cc9cc2a972d70b50e70c4911fcf210d256f8407042040ef2314d3ae180d9946d6b7e68fb2ea24a219b3748bb9f4b88f0e8a725951a5718e92
7
- data.tar.gz: ca1bbd991097e90eebfcc0aa08ecb71e7234453dfb9ab4d67dd6d30036af39992e769674e9fe2f98758cc77e7597f4637071170811ea4b9bb1ba9db5e68871fa
6
+ metadata.gz: bab42e61c5daed521738024b4ff881ec36422aa820ea2dd009025d802d444cedabb208a31e9db8c15fd6dfc6ad6d0b900d14eeb34382fe33ae7d1bf3c4c5ed92
7
+ data.tar.gz: abc4c9088b6c396aa6256ed8d35aea3d06f74ec32cadf2645712baf452b3c6e85f490521bc805b885d7d0c84643378819bee3ccfa2be1dd1bdb90f86b97020d8
@@ -193,7 +193,10 @@ module MeiliSearch
193
193
  def search(query, options = {})
194
194
  parsed_options = Utils.transform_attributes({ q: query.to_s }.merge(options.compact))
195
195
 
196
- http_post "/indexes/#{@uid}/search", parsed_options
196
+ response = http_post "/indexes/#{@uid}/search", parsed_options
197
+ response['nbHits'] ||= response['estimatedTotalHits']
198
+
199
+ response
197
200
  end
198
201
 
199
202
  ### TASKS
@@ -377,5 +380,21 @@ module MeiliSearch
377
380
  def reset_sortable_attributes
378
381
  http_delete "/indexes/#{@uid}/settings/sortable-attributes"
379
382
  end
383
+
384
+ ### SETTINGS - PAGINATION
385
+
386
+ def pagination
387
+ http_get("/indexes/#{@uid}/settings/pagination")
388
+ end
389
+ alias get_pagination pagination
390
+
391
+ def update_pagination(pagination)
392
+ http_patch "/indexes/#{@uid}/settings/pagination", pagination
393
+ end
394
+ alias pagination= update_sortable_attributes
395
+
396
+ def reset_pagination
397
+ http_delete "/indexes/#{@uid}/settings/pagination"
398
+ end
380
399
  end
381
400
  end
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MeiliSearch
4
- VERSION = '0.19.0'
4
+ VERSION = '0.19.1'
5
5
 
6
6
  def self.qualified_version
7
7
  "Meilisearch Ruby (v#{VERSION})"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: meilisearch
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.19.0
4
+ version: 0.19.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Meili
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-07-11 00:00:00.000000000 Z
11
+ date: 2022-07-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty