Skip to content
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 highlight metadata to autocomplete client #1347

Merged
merged 16 commits into from
Dec 27, 2024

Conversation

Strift
Copy link
Collaborator

@Strift Strift commented Dec 19, 2024

Pull Request

Related issue

Fixes #1337

What does this PR do?

This PR enriches the _highlightResult object with metadata:

  • fullyHighlighted: whether the highlighted text covers the entire field
  • matchLevel: degree of the match (none, partial, or full)
  • matchedWords: array of words matched

While adding the necessary tests, I also improved the existing tests for fetchMeilisearchResults.ts.

Copy link

changeset-bot bot commented Dec 19, 2024

🦋 Changeset detected

Latest commit: 731254f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@meilisearch/autocomplete-client Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@Strift Strift marked this pull request as draft December 19, 2024 11:25
@Strift Strift changed the title Feat/add highlight metadata Add highlight metadata to autocomplete client Dec 19, 2024
@Strift
Copy link
Collaborator Author

Strift commented Dec 23, 2024

Tests seem to be failing because I'm testing against Meilisearch 1.12 new highlighting format. Will re-run the CI and look to merge after Meilisearch 1.12 release.

@Strift Strift self-assigned this Dec 27, 2024
@Strift Strift force-pushed the feat/add-highlight-metadata branch from 0bb2b84 to 0093cda Compare December 27, 2024 08:26
@Strift Strift marked this pull request as ready for review December 27, 2024 09:23
@Strift Strift requested a review from flevi29 December 27, 2024 09:23
@Strift Strift added the enhancement New feature or request label Dec 27, 2024
Copy link
Collaborator

@flevi29 flevi29 left a comment

Choose a reason for hiding this comment

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

bors merge

@meili-bors meili-bors bot merged commit 8d9409b into main Dec 27, 2024
7 checks passed
@meili-bors meili-bors bot deleted the feat/add-highlight-metadata branch December 27, 2024 09:32
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.

Add 'fullyHighlighted', 'matchLevel' and 'matchedWords' to '_highlightResult' in autocomplete client
2 participants