-
Notifications
You must be signed in to change notification settings - Fork 98
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 swapIndexes
method
#422
Merged
brunoocasali
merged 3 commits into
bump-meilisearch-v0.30.0
from
bump-meilisearch-v0.30.0-add-swap-indexes
Nov 24, 2022
Merged
Add swapIndexes
method
#422
brunoocasali
merged 3 commits into
bump-meilisearch-v0.30.0
from
bump-meilisearch-v0.30.0-add-swap-indexes
Nov 24, 2022
Conversation
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
norkunas
reviewed
Nov 23, 2022
Co-authored-by: Tomas Norkūnas <[email protected]>
bidoubiwa
reviewed
Nov 24, 2022
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.
Tests are failing
Base automatically changed from
bump-meilisearch-v0.30.0-add-cancel-tasks
to
bump-meilisearch-v0.30.0
November 24, 2022 16:00
bors bot
added a commit
that referenced
this pull request
Nov 28, 2022
428: Update version for the next release (v0.26.0) r=brunoocasali a=brunoocasali 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. ## 🚀 Enhancements <details> <summary>Add support to finite pagination (#418) `@brunoocasali` </summary> Now you can call: - `$client.search('batman', [ 'page' => 1, 'hitsPerPage' => 10 ])` - `$client.search('batman', [ 'hitsPerPage' => 10 ])` - `$client.search('batman', [ 'page' => 4 ])` `results = $client.search('batman', [ 'page' => 4 ])` And get a limited pagination with a fixed number of total hits in the results object `results['totalHits']`. You can still use the `offset/limit` by calling `$client.search('batman', [ 'limit' => 4, 'offset' => 10 ])` `SearchResult#hitsCount` can still retrieve the total hits value. </details> <details> <summary> Add <code>cancelTasks</code> method (#420) `@brunoocasali` </summary> <br> Allow users to cancel a processing or an enqueued task by using `cancelTasks(CancelTasksQuery $query)` ```php // CancelTasksQuery methods: setNext(int $next) setTypes(array $types) setStatuses(array $statuses) setIndexUids(array $indexUids) setUids(array $uids) setCanceledBy(array $canceledBy) setBeforeEnqueuedAt(\DateTime $date) setAfterEnqueuedAt(\DateTime $date) setBeforeStartedAt(\DateTime $date) setAfterStartedAt(\DateTime $date) setBeforeFinishedAt(\DateTime $date) setAfterFinishedAt(\DateTime $date) ``` </details> <details> <summary> Add <code>swapIndexes</code> method (#422) `@brunoocasali` </summary> <br> Add a new method in the Client client->swapIndexes(array $indexes) to swap indexes. The array should follow this structure: [['indexA', 'indexB'], ['indexC', 'indexD'], ...] </details> <details> <summary> Add <code>deleteTasks</code> method (#423) `@brunoocasali` </summary> <br> Allow users to delete processed, failed, and canceled tasks. A new method `deleteTasks(DeleteTasksQuery $query)` ```php // DeleteTasksQuery methods: setNext(int $next) setTypes(array $types) setStatuses(array $statuses) setIndexUids(array $indexUids) setUids(array $uids) setCanceledBy(array $canceledBy) setBeforeEnqueuedAt(\DateTime $date) setAfterEnqueuedAt(\DateTime $date) setBeforeStartedAt(\DateTime $date) setAfterStartedAt(\DateTime $date) setBeforeFinishedAt(\DateTime $date) setAfterFinishedAt(\DateTime $date) ``` </details> ##⚠️ Breaking Changes - Add and Update filters to the `tasks` resource. (#419) `@brunoocasali` - Added `setUids(array<int>)` filter to match by `Task.uid`. - Added `setCanceledBy(array<int>)` filter to match by `Task.canceledBy` - Added `setBeforeEnqueuedAt(\DateTime)` filter to match by `Task.beforeEnqueuedAt` - Added `setAfterEnqueuedAt(\DateTime)` filter to match by `Task.AfterEnqueuedAt` - Added `setBeforeStartedAt(\DateTime)` filter to match by `Task.beforeStartedAt` - Added `setAfterStartedAt(\DateTime)` filter to match by `Task.AfterStartedAt` - Added `setBeforeFinishedAt(\DateTime)` filter to match by `Task.beforeFinishedAt` - Added `setAfterFinishedAt(\DateTime)` filter to match by `Task.AfterFinishedAt` -⚠️ ⚠️ Renamed `setUid(array)` to `setIndexUids(array)` filter to match by `Task.indexUid` -⚠️ ⚠️ Renamed `setStatus(array)` to `setStatuses(array<string>)` filter to match by `Task.status` Co-authored-by: Bruno Casali <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add a new method in the Client
client->swapIndexes(array $indexes)
to swap indexes. The array should follow this structure:[['indexA', 'indexB'], ['indexC', 'indexD'], ...]