-
Notifications
You must be signed in to change notification settings - Fork 47
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
GO-4442 add weights #1789
base: main
Are you sure you want to change the base?
GO-4442 add weights #1789
Conversation
// Finish performs the | ||
Finish() error |
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.
what's the missing part of the comment?
…o-4442-add-weights # Conflicts: # go.mod # go.sum
sort.Slice(resultsByObjectId[objectId], func(i, j int) bool { | ||
if bleveResults[i].Score > bleveResults[j].Score { | ||
cur := resultsByObjectId[objectId] | ||
sort.Slice(cur, func(i, j int) bool { |
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.
slices.SortFunc should be faster
|
||
byteToRuneIndex := make([]int, len(highlight)+1) | ||
for i := range byteToRuneIndex { | ||
byteToRuneIndex[i] = utf8.RuneCountInString(highlight[:i]) |
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.
you should work with utf16 (and please, check it in other fts places)
Description
What type of PR is this? (check all applicable)
Related Tickets & Documents
Mobile & Desktop Screenshots/Recordings
Added tests?
Added to documentation?
[optional] Are there any post-deployment tasks we need to perform?