meilisearch 0.22.0 → 0.23.0

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: f2556e7bd3fe01c37c9cc3c19a16d912e6e105a6b0f6089abdc3dd1d0e88111b
4
- data.tar.gz: 452a6e9453809e2ed86fd119efaf1e447d090f498d09e6c26f248aa9caa1d37f
3
+ metadata.gz: a02358b002d9f3a7b6f256140a01a8e3a55e90bab3b6a43889e8a23010bb0b4a
4
+ data.tar.gz: e2f28298a8041755692c333bb778b5996226bc7889ab2d58dab9d9cae7a350e7
5
5
  SHA512:
6
- metadata.gz: 94e85529b349d311d94f822461f157d3ca9b1409b896b3867b0bf9cabcbe6bfbcb07c23ced479629837756f0ca8a98df1a3d691dcfe768613df8a965e37c28bc
7
- data.tar.gz: f7838589d5b9f3f2b7b87ed3fed398c693555708091d869438557849b099c83ded82f308a897713d46d3e00cb4ccf5ddad73e278f18c3face25688ed2130ce96
6
+ metadata.gz: 0f4d24797d09a8176788fad8708d7dd9ac962b24d53db21a16d68ea16568935f9dc72e2c0160b50e516a45b7c2547e7afc8f0e4fc3534659daf3ec22f5b68d37
7
+ data.tar.gz: 93f401846f98f6b388eb251fe804d862ed64d45ea346944364284da47f8c4d511a082746afde481ba6f7d8742a4d95693dd7e086c219cc9ba64e6a55fb15bd66
data/README.md CHANGED
@@ -200,7 +200,7 @@ JSON output:
200
200
 
201
201
  ## 🤖 Compatibility with Meilisearch
202
202
 
203
- This package only guarantees the compatibility with the [version v1.0.0 of Meilisearch](https://github.com/meilisearch/meilisearch/releases/tag/v1.0.0).
203
+ This package guarantees compatibility with [version v1.x of Meilisearch](https://github.com/meilisearch/meilisearch/releases/latest), but some features may not be present. Please check the [issues](https://github.com/meilisearch/meilisearch-ruby/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22+label%3Aenhancement) for more info.
204
204
 
205
205
  ## 💡 Learn more
206
206
 
@@ -3,6 +3,7 @@
3
3
  module MeiliSearch
4
4
  class Client < HTTPRequest
5
5
  include MeiliSearch::TenantToken
6
+ include MeiliSearch::MultiSearch
6
7
 
7
8
  ### INDEXES
8
9
 
@@ -96,9 +96,13 @@ module MeiliSearch
96
96
  alias replace_documents_ndjson add_documents_ndjson
97
97
  alias add_or_replace_documents_ndjson add_documents_ndjson
98
98
 
99
- def add_documents_csv(documents, primary_key = nil)
99
+ def add_documents_csv(documents, primary_key = nil, delimiter = nil)
100
100
  options = { headers: { 'Content-Type' => 'text/csv' }, convert_body?: false }
101
- http_post "/indexes/#{@uid}/documents", documents, { primaryKey: primary_key }.compact, options
101
+
102
+ http_post "/indexes/#{@uid}/documents", documents, {
103
+ primaryKey: primary_key,
104
+ csvDelimiter: delimiter
105
+ }.compact, options
102
106
  end
103
107
  alias replace_documents_csv add_documents_csv
104
108
  alias add_or_replace_documents_csv add_documents_csv
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module MeiliSearch
4
+ module MultiSearch
5
+ def multi_search(data)
6
+ body = Utils.transform_attributes(data)
7
+
8
+ http_post '/multi-search', queries: body
9
+ end
10
+ end
11
+ end
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MeiliSearch
4
- VERSION = '0.22.0'
4
+ VERSION = '0.23.0'
5
5
 
6
6
  def self.qualified_version
7
7
  "Meilisearch Ruby (v#{VERSION})"
data/lib/meilisearch.rb CHANGED
@@ -3,6 +3,7 @@
3
3
  require 'meilisearch/version'
4
4
  require 'meilisearch/utils'
5
5
  require 'meilisearch/http_request'
6
+ require 'meilisearch/multi_search'
6
7
  require 'meilisearch/tenant_token'
7
8
  require 'meilisearch/task'
8
9
  require 'meilisearch/client'
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.22.0
4
+ version: 0.23.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Meili
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-02-06 00:00:00.000000000 Z
11
+ date: 2023-04-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty
@@ -43,6 +43,7 @@ files:
43
43
  - lib/meilisearch/error.rb
44
44
  - lib/meilisearch/http_request.rb
45
45
  - lib/meilisearch/index.rb
46
+ - lib/meilisearch/multi_search.rb
46
47
  - lib/meilisearch/task.rb
47
48
  - lib/meilisearch/tenant_token.rb
48
49
  - lib/meilisearch/utils.rb