Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
425: Changes related to the next Meilisearch release (v1.1.0) r=curquiza a=meili-bot Related to this issue: meilisearch/integration-guides#251 This PR: - gathers the changes related to the next Meilisearch release (v1.1.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.1.0 is out.⚠️ This PR should NOT be merged until the next release of Meilisearch (v1.1.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._ 432: Update version for the next release (v0.23.0) r=curquiza a=meili-bot This version introduces features released on Meilisearch v1.1.0 🎉 Check out the changelog of [Meilisearch v1.1.0](https://github.com/meilisearch/meilisearch/releases/tag/v1.1.0) for more information on the changes. ### 🚀 Enhancements - Add a new optional argument to `add_documents_csv`. This argument allows you to customize the separator character in your `csv` file. (#429) `@brunoocasali.` - Add `client.multi_search()` method to execute multiple search requests simultaneously with different configurations. (#430) `@brunoocasali` Usage example: ```ruby client.multi_search([ { index_uid: 'books', q: 'prince' }, { index_uid: 'movies', q: 'prince' }, ]) ```⚠️ The `SearchQuery` was not meant to be used if the regular `$index->search()` requests (yet). Co-authored-by: meili-bot <74670311+meili-bot@users.noreply.github.com> Co-authored-by: Bruno Casali <brunoocasali@gmail.com>
- Loading branch information
Showing
11 changed files
with
98 additions
and
14 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# frozen_string_literal: true | ||
|
||
module MeiliSearch | ||
module MultiSearch | ||
def multi_search(data) | ||
body = Utils.transform_attributes(data) | ||
|
||
http_post '/multi-search', queries: body | ||
end | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# frozen_string_literal: true | ||
|
||
RSpec.describe 'MeiliSearch::Client - Multiple Index Search' do | ||
before do | ||
client.create_index('books') | ||
client.create_index('movies') | ||
end | ||
|
||
it 'does a custom search with two different indexes' do | ||
response = client.multi_search([ | ||
{ index_uid: 'books', q: 'prince' }, | ||
{ index_uid: 'movies', q: 'prince' } | ||
]) | ||
|
||
expect(response['results'].count).to eq(2) | ||
expect(response['results'][0]['estimatedTotalHits']).to eq(0) | ||
expect(response['results'][1]['estimatedTotalHits']).to eq(0) | ||
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
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