Skip to content

Conversation

meili-bot
Copy link
Contributor

@meili-bot meili-bot commented Jun 5, 2023

This version introduces features released on Meilisearch v1.2.0 🎉
Check out the changelog of Meilisearch v1.2.0 for more information on the changes.
⚠️ If you want to adopt new features of this release, update the Meilisearch server to the according version.

Check the complete CHANGELOG here: https://github.com/meilisearch/meilisearch-dart/blob/main/CHANGELOG.md

💥 Breaking changes

  • The method deleteDocuments() now supports a different behavior. This method now takes a DeleteDocumentsQuery, which could contain the filter or the ids (aka old behavior). Changes for v1.2.0 #318 @ahmednfwela

    ⚠️ You must configure the attributes you want to filter using the MeiliSearchIndex.filterableAttributes().
    ⚠️ Remember to update your Meilisearch server to v1.2.0 or newer before adopting it.

    Still, even being supported, the ability to receive only a list of ids is deprecated, and it will be removed soon.

    // from:
    - Future<Task> deleteDocuments(List<Object> ids)
    + Future<Task> deleteDocuments(DeleteDocumentsQuery query)
    
    // to:
    - index.deleteDocuments([456, 4])
    + index.deleteDocuments(DeleteDocumentsQuery(ids: [456, 4]))
  • Add the ability to set filter in the DocumentsQuery. When a query with a filter is sent to getDocuments(params: DocumentsQuery) it will filter the documents like the search method. See the docs on how to use filters. Changes for v1.2.0 #318 @ahmednfwela

    ⚠️ You must configure the attributes you want to filter using the MeiliSearchIndex.filterableAttributes().
    ⚠️ Remember to update your Meilisearch server to v1.2.0 or newer before adopting it.

  • MeiliSearchIndex.search now takes a String query and a SearchQuery object as the only inputs. SearchQuery Major refactor #310 @ahmednfwela

    • Replace any occurrence of search index.search('xyz', ....) with index.search('xyz', SearchQuery(....))
    - await client.index('books').search('query', sort: [], filter: ...);
    + await client.index('books').search('query', SearchQuery(sort: [], filter: ...));
  • Meili.geoBoundingBox and Meili.geoRadius now take record values to represent the lat/lng points: SearchQuery Major refactor #310 @ahmednfwela

    // Confusing, unclear
    - Meili.geoBoundingBox(3,5.3,10,20)
    // Not Confusing :)
    + Meili.geoBoundingBox((lat: 3, lng: 5.3), (lat: 10, lng: 20))
    // Confusing, unclear
    - Meili.geoRadius(3, 5.3, 100)
    // Not Confusing :)
    + Meili.geoRadius((lat: 3, lng: 5.3), 100)
  • Change MultiSearchQuery.queries to be a List<IndexSearchQuery> instead of a List<SearchQuery>: SearchQuery Major refactor #310 @ahmednfwela

    final result = await client.multiSearch(MultiSearchQuery(queries: [
    -      SearchQuery(
    +      IndexSearchQuery(
              query: "",
              indexUid: index1.uid,
            ),
    -    SearchQuery(
    +    IndexSearchQuery(
              query: "",
              indexUid: index2.uid,
            ),
    ];

Enhancements:

Thanks again to @brunoocasali, @ahmednfwela! 🎉

@meili-bot meili-bot added the skip-changelog The PR will not appear in the release changelogs label Jun 5, 2023
Copy link
Contributor

@alallema alallema left a comment

Choose a reason for hiding this comment

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

I'm not sure to understand why do this changelog and the PR body changelog not match? deleteDocument modification is in the breaking here and getDocument modification does not appear. Same here we have geoBoundingBox but not in the body

@ahmednfwela
Copy link
Collaborator

ahmednfwela commented Jun 6, 2023

@alallema I think the PR body changelog is related to the version pump of 1.2.0, but the changelog file is related to the actual changes

@alallema
Copy link
Contributor

alallema commented Jun 6, 2023

Thanks @ahmednfwela

Copy link
Contributor

@alallema alallema left a comment

Choose a reason for hiding this comment

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

LGTM!
And thanks @ahmednfwela for this release 🎉 You rocks 🔥 🔥 🔥

@ahmednfwela
Copy link
Collaborator

@brunoocasali I think this is better as well

@brunoocasali
Copy link
Member

Sorry @ahmednfwela , I removed my comment. I thought I was fast enough!

I want to take some time to do the CHANGELOG only once, and I think the file is in the correct place. But at the same time, I think I just release using the names of the pull requests the users could be misled and didn't even reach the CHANGELOG.
At the same time, I like the Github Changelog because we have a link to the PR.

@brunoocasali
Copy link
Member

bors merge

@meili-bors
Copy link
Contributor

meili-bors bot commented Jun 6, 2023

Build succeeded:

@meili-bors meili-bors bot merged commit 0a33f19 into main Jun 6, 2023
@meili-bors meili-bors bot deleted the meili-bot/bump-version branch June 6, 2023 19:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip-changelog The PR will not appear in the release changelogs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants