Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes related to the next Meilisearch release (v0.29.0) #362

Merged
merged 5 commits into from
Oct 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ JSON output:

## 🤖 Compatibility with Meilisearch

This package only guarantees the compatibility with the [version v0.28.0 of Meilisearch](https://github.com/meilisearch/meilisearch/releases/tag/v0.28.0).
This package only guarantees the compatibility with the [version v0.29.0 of Meilisearch](https://github.com/meilisearch/meilisearch/releases/tag/v0.29.0).

## 💡 Learn More

Expand Down
6 changes: 6 additions & 0 deletions spec/meilisearch/client/keys_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@
expect(new_key['description']).to eq('A new key to add docs')
end

it 'creates a key with wildcarded action' do
new_key = client.create_key(add_docs_key_options.merge(actions: ['documents.*']))

expect(new_key['actions']).to eq(['documents.*'])
end

it 'creates a key with setting uid' do
new_key = client.create_key(add_docs_key_options.merge(uid: uuid_v4))

Expand Down
17 changes: 17 additions & 0 deletions spec/meilisearch/index/search/matching_strategy_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# frozen_string_literal: true

RSpec.describe 'MeiliSearch::Index - Search with matching_strategy' do
include_context 'search books with nested fields'

it 'does a custom search with a matching strategy ALL' do
response = index.search('another french book', matching_strategy: 'all')

expect(response['hits'].count).to eq(1)
end

it 'does a custom search with a matching strategy LAST' do
response = index.search('french book', matching_strategy: 'last')

expect(response['hits'].count).to eq(2)
end
end