-
-
Notifications
You must be signed in to change notification settings - Fork 296
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
searchResultWithHighlight incorrectly typed #496
Comments
Hi @tpict! Thanks for opening this. /bounty 50 |
💎 $50 bounty created by micheleriva
|
💡 @rishi-raj-jain submitted a pull request that claims the bounty. You can visit your org dashboard to reward. |
🎉🎈 @rishi-raj-jain has been awarded $50! 🎈🎊 |
Describe the bug
See guide on setting up highlighting. It indicates that the results will come in shape
but if you do
typeof results.hits[number].positions[number]
, you getPosition
which is just the innermost object with{ start: number; length: number; }
. This doesn't line up with the record of document fields -> search hits -> positions seen in the example.To Reproduce
Follow example above
Expected behavior
hits.positions
is correctly typedScreenshots
Desktop (please complete the following information):
"@orama/orama": "^1.2.8"
,"@orama/plugin-match-highlight": "^1.2.8",
The text was updated successfully, but these errors were encountered: