Skip to content

Conversation

@alallema
Copy link
Contributor

@alallema alallema commented Feb 16, 2023

Add new filters on the get /tasks route.

Present in this spec

V0.30.0
in TasksQuery:

  • Add uids
  • Add CanceledBy
  • Add BeforeEnqueuedAt
  • Add AfterEnqueuedAt
  • Add BeforeStartedAt
  • Add AfterStatedAt
  • Add BeforeFinishedAt
  • Add AfterFinishedAt
  • Rename status to statuses
  • Rename type to types
  • Rename indexUid to indexUids

Tests:

  • uid
  • canceledBy
  • beforeEnqueuedAt

@alallema alallema force-pushed the add_tasks_filters_for_v0.30 branch from 1561ddb to 8717667 Compare February 16, 2023 16:40
@alallema alallema force-pushed the add_tasks_filters_for_v0.30 branch from 01a902d to b93c33f Compare February 21, 2023 13:31
@alallema alallema added the breaking-change The related changes are breaking for the users label Feb 21, 2023
Copy link
Member

@brunoocasali brunoocasali left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left some suggestions you can tackle in another moment!

LGTM!

.setFrom(from)
.setStatus(new String[] {"enqueued", "succeeded"})
.setType(new String[] {"indexDeletion"});
.setStatuses(new String[] {"enqueued", "succeeded"})
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can create an issue to make this a enum :)

.setStatus(new String[] {"enqueued", "succeeded"})
.setType(new String[] {"indexDeletion"});
.setStatuses(new String[] {"enqueued", "succeeded"})
.setTypes(new String[] {"indexDeletion"});
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The types can also be an enum!

@alallema alallema merged commit 28e845c into bump-meilisearch-v0.30.0 Feb 22, 2023
@alallema alallema deleted the add_tasks_filters_for_v0.30 branch February 22, 2023 09:58
bors bot added a commit that referenced this pull request Feb 27, 2023
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 <[email protected]>
Co-authored-by: Amélie <[email protected]>
Co-authored-by: alallema <[email protected]>
bors bot added a commit that referenced this pull request Feb 27, 2023
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 <[email protected]>
Co-authored-by: Amélie <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking-change The related changes are breaking for the users

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants