Skip to content

Update document query for v0.28.0 #326

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

Merged
merged 5 commits into from
Aug 30, 2022

Conversation

bidoubiwa
Copy link
Contributor

@bidoubiwa bidoubiwa commented Aug 30, 2022

For consistency between all routes that provide query parameters, this PR add a structure DocumentQuery in which you can set the fields parameters.

Changes

  • New method index.get_document_with gives the possibility to fetch documents with

Usage

    let mut document_query = DocumentQuery::new(&index);
    document_query.with_fields(["id"]);
    
    let document = index.get_document_with::<MyObjectReduced>("1", &document_query).await.unwrap();

@bidoubiwa bidoubiwa requested a review from irevoire August 30, 2022 12:21
@bidoubiwa bidoubiwa changed the base branch from main to bump-meilisearch-v0.28.0 August 30, 2022 12:21
@bidoubiwa bidoubiwa added breaking-change The related changes are breaking for the users enhancement New feature or request and removed breaking-change The related changes are breaking for the users labels Aug 30, 2022
@bidoubiwa bidoubiwa merged commit 5943cb7 into bump-meilisearch-v0.28.0 Aug 30, 2022
@bidoubiwa bidoubiwa deleted the update_document_query_for_v0.28.0 branch August 30, 2022 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants