-
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 new search parameters highlightPreTag, highlightPostTag and cropM… #318
Conversation
'cropLength' => 2, | ||
]); | ||
|
||
$this->assertArrayHasKey('_formatted', $response->getHit(0)); |
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.
Why here did you use $response->getHit(0)
and in the assertion below you opted to use $response['hits'][0]
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.
I use $response['hits']
on the result of the rawSearch
function who returns array
instead of SearchResult
. The getter can be called on an array
:
See here the rawSearch function
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.
I prefer getters! Maybe it is worth creating an issue to change this consistently throughout the tests.
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.
The rawSearch
is here to access your specific fields in results
I find it really useful, I used it in tests when I need to check the exact field of it. Don't think it's not consistent.
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.
But we can create a specific class for the movies
result or the books
result in test
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.
I see, but is there any specific reason to use the raw result?
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.
The rawResult
gives me access to the subfields of _formatted
because it is an array.I used it for check the cropMarker
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.
🐕 LGTM!
312: Changes related to the next Meilisearch release (v0.27.0) r=curquiza a=meili-bot Related to this issue: meilisearch/integration-guides#190 This PR: - gathers the changes related to the next Meilisearch release (v0.27.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.27.0 is out.⚠️ This PR should NOT be merged until the next release of Meilisearch (v0.27.0) is out. _This PR is auto-generated for the [pre-release week](https://github.com/meilisearch/integration-guides/blob/master/guides/pre-release-week.md) purpose._ Done: - #313 - #315 - #316 - #317 - #318 - #320 Co-authored-by: meili-bot <74670311+meili-bot@users.noreply.github.com> Co-authored-by: Amélie <alallema@users.noreply.github.com> Co-authored-by: alallema <amelie@meilisearch.com>
324: Update version for the next release (v0.23.2) r=curquiza a=alallema This version makes this package compatible with MeiliSearch v0.27.0🎉 Check out the changelog of [MeiliSearch v0.27.0](https://github.com/meilisearch/MeiliSearch/releases/tag/v0.27.0) for more information about the changes. ## 🚀 Enhancements - Add new methods for the new typo tolerance settings #316 `@alallema` `index.getTypoTolerance()` `index.updateTypoTolerance(params)` `index.resetTypoTolerance()` - Ensure nested field support #317 `@alallema` - Add new search parameters highlightPreTag, highlightPostTag and cropMarker #318 `@alallema` ## 🐛 Bug Fixes * Fix `getKeys` method (#323) `@alallema` Co-authored-by: alallema <amelie@meilisearch.com>
As per meilisearch/meilisearch#2214 new search parameters are introduced:
highlightPreTag
highlightPostTag
cropMarker