Skip to content

Conversation

bidoubiwa
Copy link
Contributor

@bidoubiwa bidoubiwa commented Apr 21, 2022

Pull Request

What does this PR do?

Previously instant-meilisearch changed the default <em> tags in the specific fields depending on the highlightPreTag and highlightPostTag value provided by the configuration widget of instantsearch.

The replacement of the HTML tags was done by instant-meilisearch. Now, you can provide custom tags to Meilisearch which will use these instead of the previous em.

@bidoubiwa bidoubiwa changed the base branch from main to update_snippeting_resolver April 21, 2022 13:56
Base automatically changed from update_snippeting_resolver to bump-meilisearch-v0.27.0 April 21, 2022 14:03
@bidoubiwa bidoubiwa force-pushed the add_highlight_prefix_suffix branch from e8969ec to c950afe Compare April 21, 2022 14:04
@bidoubiwa bidoubiwa added the skip-changelog The PR will not appear in the release changelogs label Apr 21, 2022
@bidoubiwa bidoubiwa marked this pull request as ready for review April 21, 2022 14:14
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.

Well done! Just ask few questions 🌮

Comment on lines +242 to +245
if (hit?.title) {
expect(hit?.title?.value).toEqual('Ariel')
}

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't understand how you get this result with your query?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is from inside the nested object!

expect(hit?.objectArray[0]?.name.value).toEqual(
        '__ais-highlight__hello__/ais-highlight__ world'
      )

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! 🍘

@bidoubiwa bidoubiwa merged commit baef2e4 into bump-meilisearch-v0.27.0 Apr 25, 2022
@bidoubiwa bidoubiwa deleted the add_highlight_prefix_suffix branch April 25, 2022 14:25
@bidoubiwa bidoubiwa added enhancement New feature or request and removed skip-changelog The PR will not appear in the release changelogs labels May 5, 2022
@bidoubiwa bidoubiwa changed the title Add highlight prefix suffix Add highlight prefix suffix tags May 5, 2022
meili-bors bot added a commit that referenced this pull request May 9, 2022
749: Update version for the next release (v0.7.1) r=brunoocasali a=bidoubiwa

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 on the changes.

## 🚀 Enhancements

- Add highlight prefix suffix tags #739
- Add crop marker support #738

Thanks again to `@bidoubiwa` and `@mmachatschek!` 🎉


Co-authored-by: cvermand <33010418+bidoubiwa@users.noreply.github.com>
meili-bors bot added a commit that referenced this pull request Jul 10, 2024
1306: instant-meilisearch: Fix _matchesPosition not being included in hits r=brunoocasali a=mavcook

# Pull Request

## Related issue
Fixes #1305

## What does this PR do?
Corrects _matchesPosition field not being included in each hit when meiliSearchParam.showMatchesPosition=true

### Regression
This bug was introduced in PR #739, release [0.7.1](https://github.com/meilisearch/meilisearch-js-plugins/releases/tag/v0.7.1), which just seems to have been a typo/forgetting to include _matchesPosition, as you can see it was included in the destructured assignment, but not used.

## PR checklist
Please check if your PR fulfills the following requirements:
- [x] Does this PR fix an existing issue, or have you listed the changes applied in the PR description (and why they are needed)?
- [x] Have you read the contributing guidelines?
- [x] Have you made sure that the title is accurate and descriptive of the changes?

Co-authored-by: mavcook <16587643+mavcook@users.noreply.github.com>
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