-
Notifications
You must be signed in to change notification settings - Fork 108
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
Add swap indexes api for v0.30.0 #554
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! 🥇
@@ -201,6 +202,37 @@ public void testDeleteIndex() throws Exception { | |||
assertThrows(MeilisearchApiException.class, () -> client.getIndex(indexUid)); | |||
} | |||
|
|||
/** Test swapIndexes */ | |||
@Test | |||
public void testSwapIndexes() throws Exception { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I appreciate the effort to test it, but it could be more straightforward. Just the assertion to make sure you could request using the correct indexes and retrieve the type of the task indexSwap
would have been ok.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I knew you were going to say that when I wrote the test but I couldn't help myself 🤭
7e816f4
to
5696e70
Compare
482: Changes related to the next Meilisearch release (v0.30.0) r=alallema a=meili-bot Related to this issue: meilisearch/integration-guides#221 This PR: - gathers the changes related to the next Meilisearch release (v0.30.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.30.0 is out.⚠️ This PR should NOT be merged until the next release of Meilisearch (v0.30.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._ Done: - #544 - #545 - #546 - #547 - #548 - #554 Co-authored-by: meili-bot <74670311+meili-bot@users.noreply.github.com> Co-authored-by: Amélie <alallema@users.noreply.github.com> Co-authored-by: alallema <amelie@meilisearch.com>
553: Update version for the next release (v0.11.0) r=alallema a=meili-bot This version makes this package compatible with Meilisearch v0.30.0 🎉 Check out the changelog of [Meilisearch v0.30.0](https://github.com/meilisearch/meilisearch/releases/tag/v0.30.0) for more information on the changes(#382). ##⚠️ Breaking changes * Add a builder for `SearchRequest` class (#543) `@alallema` - The search method can now only be instantiated: ```java SearchResult search(String q) Searchable search(SearchRequest searchRequest) ``` * Parameters on `getTasks` name changes: #390 - `status` -> `statuses` - `indexUID` -> `indexUIDS` - `type` -> `types` * New `pagination` strategy with the search parameters `page` and `hitsPerPage` #546 - `public Searchable search(SearchRequest searchRequest)` method now return `Searchable` which can be extended to two different classes of results `SearchResult` and `SearchResultPaginated` - `SearchResult` is now an extended class of `Searchable` - Creation of the `SearchResultPaginated` class to handle pagination results from search - Creation of a common search result class `Searchable` ## 🚀 Enhancements * Implement `getRawIndexes` with query parameters (#558) `@oraliahdz` * New filters on `setTasks`: `uid`, `beforeEnqueuedAt`, `afterEnqueuedAt`, ... see #544 * New `client.cancelTasks` method that lets you cancel `enqueued` and `processing` tasks #547 * New `client.deleteTasks` method that lets you delete tasks #548 * New `client.swapIndexes` method that lets you swap two indexes #554 * New fields on `TaskDetails` and modification of ``TaskInfo` #545 ## 🐛 Bug Fixes * Fix: #550 Add a constructor to initialize HttpClient using Gson by default (#551) `@gpor0` * Fix matching strategy enum usage and add test (#561) `@alallema` Thanks again to `@alallema,` `@gpor0` and `@oraliahdz!` 🎉 Co-authored-by: meili-bot <74670311+meili-bot@users.noreply.github.com> Co-authored-by: Amélie <alallema@users.noreply.github.com>
As per the specification
SWAP INDEXES
swapIndexesParams
typeswapIndexes
method in the clientswaps
in task details