-
Notifications
You must be signed in to change notification settings - Fork 46
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
311: Changes related to the next Meilisearch release (v0.27.0) r=curquiza a=meili-bot Related to this issue: meilisearch/integration-guides#190 This PR: - gathers the changes related to the next Meilisearch release (v0.27.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 v0.27.0 is out.⚠️ This PR should NOT be merged until the next release of Meilisearch (v0.27.0) is out. _This PR is auto-generated for the [pre-release week](https://github.com/meilisearch/integration-guides/blob/master/guides/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
Showing
10 changed files
with
166 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# frozen_string_literal: true | ||
|
||
RSpec.describe 'MeiliSearch::Index - nested fields search' do | ||
include_context 'search books with nested fields' | ||
|
||
it 'searches without params' do | ||
response = index.search('an awesome') | ||
|
||
expect(response['hits'].count).to eq(1) | ||
expect(response.dig('hits', 0, 'info', 'comment')).to eq('An awesome book') | ||
expect(response.dig('hits', 0, 'info', 'reviewNb')).to eq(900) | ||
end | ||
|
||
it 'searches within index with searchableAttributes setting' do | ||
wait_for_it index.update_searchable_attributes(['title', 'info.comment']) | ||
wait_for_it index.add_documents(documents) | ||
|
||
response = index.search('An awesome') | ||
|
||
expect(response['hits'].count).to eq(1) | ||
expect(response.dig('hits', 0, 'info', 'comment')).to eq('An awesome book') | ||
expect(response.dig('hits', 0, 'info', 'reviewNb')).to eq(900) | ||
end | ||
|
||
it 'searches within index with searchableAttributes and sortableAttributes settings' do | ||
wait_for_it index.update_searchable_attributes(['title', 'info.comment']) | ||
wait_for_it index.update_sortable_attributes(['info.reviewNb']) | ||
wait_for_it index.add_documents(documents) | ||
|
||
response = index.search('An awesome') | ||
|
||
expect(response['hits'].count).to eq(1) | ||
expect(response.dig('hits', 0, 'info', 'comment')).to eq('An awesome book') | ||
expect(response.dig('hits', 0, 'info', 'reviewNb')).to eq(900) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters