Skip to content

Commit

Permalink
Merge #410
Browse files Browse the repository at this point in the history
410: Changes related to the next Meilisearch release (v1.0.0) r=brunoocasali a=meili-bot

Related to this issue: meilisearch/integration-guides#230

This PR:
- gathers the changes related to the next Meilisearch release (v1.0.0) so that this package is ready when the official release is out.
- should pass the tests against the [latest pre-release of Meilisearch](https://github.com/meilisearch/meilisearch/releases).
- might eventually contain test failures until the Meilisearch v1.0.0 is out.

⚠️ This PR should NOT be merged until the next release of Meilisearch (v1.0.0) is out.

_This PR is auto-generated for the [pre-release week](https://github.com/meilisearch/integration-guides/blob/main/resources/pre-release-week.md) purpose._


Co-authored-by: meili-bot <74670311+meili-bot@users.noreply.github.com>
Co-authored-by: Bruno Casali <brunoocasali@gmail.com>
  • Loading branch information
3 people committed Feb 6, 2023
2 parents e74e3c1 + 0b0509b commit 7f464f4
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 16 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -200,7 +200,7 @@ JSON output:

## 🤖 Compatibility with Meilisearch

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

## 💡 Learn more

Expand Down
14 changes: 7 additions & 7 deletions spec/meilisearch/index/documents_spec.rb
Expand Up @@ -476,12 +476,12 @@
id: 1,
title: 'The Red and the Black'
}, 'id')
client.wait_for_task(task['taskUid'])
expect(index.fetch_primary_key).to eq('unique')
doc = index.document(3)
expect(doc['unique']).to eq(3)
expect(doc['id']).to eq(1)
expect(doc['title']).to eq('The Red and the Black')

task = client.wait_for_task(task['taskUid'])

expect(task['status']).to eq('failed')
expect(task['type']).to eq('documentAdditionOrUpdate')
expect(task['error']['code']).to eq('index_primary_key_already_exists')
end
end

Expand Down Expand Up @@ -521,7 +521,7 @@
task = index.add_documents!(documents)
update = index.task(task['uid'])
expect(update['status']).to eq('failed')
expect(update['error']['code']).to eq('primary_key_inference_failed')
expect(update['error']['code']).to eq('index_primary_key_no_candidate_found')
end
end

Expand Down
13 changes: 5 additions & 8 deletions spec/meilisearch/index/settings_spec.rb
Expand Up @@ -149,12 +149,9 @@
end

it 'fails when updating with wrong ranking rules name' do
task = index.update_ranking_rules(wrong_ranking_rules)
task = client.wait_for_task(task['taskUid'])

expect(task['type']).to eq('settingsUpdate')
expect(task.keys).to include('error')
expect(task['error']['code']).to eq('invalid_ranking_rule')
expect do
index.update_ranking_rules(wrong_ranking_rules)
end.to raise_meilisearch_api_error_with(400, 'invalid_settings_ranking_rules', 'invalid_request')
end

it 'resets ranking rules' do
Expand Down Expand Up @@ -437,7 +434,7 @@
it 'returns an error when the body is invalid' do
expect do
index.update_stop_words(test: 'test')
end.to raise_bad_request_meilisearch_api_error
end.to raise_meilisearch_api_error_with(400, 'invalid_settings_stop_words', 'invalid_request')
end

it 'resets stop-words' do
Expand Down Expand Up @@ -628,7 +625,7 @@
task = client.wait_for_task(task['taskUid'])

expect(task.keys).to include('error')
expect(task['error']['code']).to eq('primary_key_inference_failed')
expect(task['error']['code']).to eq('index_primary_key_no_candidate_found')
end

it 'adds documents when there is a primary-key' do
Expand Down

0 comments on commit 7f464f4

Please sign in to comment.