Skip to content

Conversation

@meili-bot
Copy link
Contributor

This PR is auto-generated.

Update the code-samples.meilisearch.yml according to the integration-guides issue for more information and the complete description about what should be done here check that issue.

@meili-bot meili-bot added documentation Improvements or additions to documentation skip-changelog The PR will not appear in the release changelogs labels Jul 4, 2022
@brunoocasali brunoocasali requested review from curquiza and removed request for curquiza July 5, 2022 14:28
$client->index('movies')->delete();
get_one_document_1: |-
$client->index('movies')->getDocument(25684);
$client->index('movies')->getDocument(25684, (new IndexesQuery())->setFields(['id', 'title', 'poster', 'release_date']));
Copy link
Member

@curquiza curquiza Jul 6, 2022

Choose a reason for hiding this comment

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

If I'm correct it's impossible to use setFields currently with getDocument even if it's possible with getDocuments

Copy link
Member

Choose a reason for hiding this comment

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

Actually, it is possible! But not using an object like the other lists

https://github.com/meilisearch/meilisearch-php/pull/330/files#diff-e9d21daaebab447e971d7be7fed317c0809d2d3eeb05124d0413f89713751c7eR14

I've opted to just use the fields in this case because I hardly believe the getDocument will increase their public API in the future.

Copy link
Member

Choose a reason for hiding this comment

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

Ok! thanks!
I've updated the code sample, let me know if it's correct then 😄

@curquiza curquiza marked this pull request as ready for review July 6, 2022 13:35
@curquiza curquiza requested a review from brunoocasali July 6, 2022 13:35
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.

🎉

@brunoocasali brunoocasali merged commit fd7f356 into bump-meilisearch-v0.28.0 Jul 6, 2022
@brunoocasali brunoocasali deleted the meili-bot/code-samples-v0-28 branch July 6, 2022 17:06
brunoocasali added a commit that referenced this pull request Jul 11, 2022
* Update .code-samples.meilisearch.yaml
* Update code samples
* Fix list_indexes code sample
* Fix get_one_document_1 code sample
* Update .code-samples.meilisearch.yaml

Author: Clémentine Urquizar <[email protected]>
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

Labels

documentation Improvements or additions to documentation 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